# Help with recurrence relation

I try to solve the following recursion for $$n \in \mathbb{N}$$.

$$r_i = r_{i-1} - \frac{1}{2} \cdot \sqrt{1 - \frac{4\pi^2\cdot r_{i-1}^2}{n^2} \cdot \cos^2 \left(\frac{\pi}{n}\right)}$$

$$r_0 = \frac{n}{2\pi}$$

I translated it into the following code for Mathematica:

RSolve[{g[x]==g[x-1]- 1/2 Sqrt[1 - 4 Pi^2  g[x-1]^2/n^2  (Cos[Pi/n])^2], g[0]==n/(2  Pi)}, g[x], x]


However, Mathematica cannot interpret this and I get the input as result. Is there any mistake from my side or is Mathematica not able to solve this?

• Almost certainly the latter. Mar 14, 2019 at 14:22

Will using RecurrenceTable helps?
RecurrenceTable[{g[x] ==  g[x - 1] - 1/2 Sqrt[1 - 4 Pi^2 g[x - 1]^2/n^2 (Cos[Pi/n])^2],