Help with recurrence relation - Mathematica Stack Exchange most recent 30 from mathematica.stackexchange.com 2019-09-19T15:42:02Z https://mathematica.stackexchange.com/feeds/question/193232 https://creativecommons.org/licenses/by-sa/4.0/rdf https://mathematica.stackexchange.com/q/193232 0 Help with recurrence relation Jannik https://mathematica.stackexchange.com/users/61034 2019-03-14T09:00:10Z 2019-03-14T09:52:41Z <p>I try to solve the following recursion for <span class="math-container">$n \in \mathbb{N}$</span>.</p> <p><span class="math-container">$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)}$</span> </p> <p><span class="math-container">$r_0 = \frac{n}{2\pi}$</span> </p> <p>I translated it into the following code for Mathematica:</p> <pre><code>RSolve[{g[x]==g[x-1]- 1/2 Sqrt[1 - 4 Pi^2 g[x-1]^2/n^2 (Cos[Pi/n])^2], g==n/(2 Pi)}, g[x], x] </code></pre> <p>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?</p> https://mathematica.stackexchange.com/questions/193232/-/193233#193233 1 Answer by zhk for Help with recurrence relation zhk https://mathematica.stackexchange.com/users/8538 2019-03-14T09:52:41Z 2019-03-14T09:52:41Z <p>Will using <code>RecurrenceTable</code> helps?</p> <pre><code>RecurrenceTable[{g[x] == g[x - 1] - 1/2 Sqrt[1 - 4 Pi^2 g[x - 1]^2/n^2 (Cos[Pi/n])^2], g == n/(2 Pi)}, g, {x, 1, 3}] </code></pre>