Given sequence:$$\begin{cases}x_{n+1}(2\cos(\frac{\pi}{m})-x_n)=1,\forall n\geq 1\\x_1=x\in\mathbb R,m\in\mathbb N,m\geq 2\end{cases}$$Minimize $$A=\frac{1}{2}\sum_{k=1}^m (x_{k+1}-x_{k})^2$$
Edit
I've proved that $\frac{dA}{dx}|_{x=-1}=0$ (see my answer). The problem now is to show that $A_{\min}=A|_{x=-1}$ is the global minimum.
The part below belongs to the original post
$A$ is actually the area bounded by the zig-zag loop between $y=\frac{1}{2\cos(\frac{\pi}{m})-x}$ and $y=x$. I tried it on a computer and observed that $A$ minimizes at $x=-1,\forall m$, and other $m-1$ values of $x$, resulting in the same minimal value of $A$ (the only minimum of $A$). I did try to prove the necessary condition $\frac{dA}{dx} |_{x=-1}=0$, after some algebra, the equivalent equation is:$$\sum_{k=1}^m \left(x_k-2\cos\left(\frac{\pi}{m}\right)x_{k+1}^2+x_{k+1}^3\right)\prod_{i=1}^k x_i^2|_{x=-1}=0$$I recognized a sort of symmetry inside the sum (sum of two terms (of the sum above) with indices adding up to $m$ is $0$ and the last term is $0$ as well) but I couldn't figure out how to deal with the product in the sum. How do I proceed from here?
Also, with the necessary condition proved, how can I show that there is exactly one minimal value of $A$ for every $m$?
[Feel free to check out this graph]