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]
Not yet the solution, but I found
1
For the sake of simplicity, let us denote $\alpha = \pi/m$ and $t_1,t_2$ be the two solutions of $$t= \frac{1}{2\cos\left(\frac{\pi}{m} \right) -t } $$ then $$t_{1,2} = e^{\pm \mathbf{i} \frac{\pi}{m}} = e^{\pm \mathbf{i} \alpha} = \cos(\alpha) \pm\mathbf{i}\sin(\alpha)$$ We have: $$\begin{align} x_{k+1} -t_1&= \frac{1}{2\cos\left(\frac{\pi}{m} \right) -x_k }-\frac{1}{2\cos\left(\frac{\pi}{m} \right) -t_1 }\\ & = \frac{x_k-t_1}{2\cos\left(\frac{\pi}{m} \right) -x_k }\cdot\frac{1}{2\cos\left(\frac{\pi}{m} \right) -t_1 }\\ x_{k+1} -t_1& = \frac{x_k-t_1}{2\cos\left(\frac{\pi}{m} \right) -x_k }\cdot t_1 \tag{1} \end{align}$$ Same for $t_2$, we have: $$x_{k+1} -t_2= \frac{x_k-t_2}{2\cos\left(\frac{\pi}{m} \right) -x_k }\cdot t_2\tag{2}$$
$(1)/(2)$ we deduce: $$\frac{x_{k+1} -t_1}{x_{k+1} -t_2} = \frac{x_{k} -t_1}{x_{k} -t_2}\cdot \frac{t_1}{t_2}\tag{3}$$ From $(3)$, we deduce the closed form expression of $x_k$ for $k \in \{1,...,m \}$: $$\begin{align} \frac{x_{k} -t_1}{x_{k} -t_2} = \frac{x -t_1}{x -t_2} \left(\frac{t_1}{t_2}\right)^{k-1} &\implies x_k= \frac{x(t_2^{k-2}-t_1^{k-2})-(t_2^{k-1}-t_1^{k-1})}{x(t_2^{k-1}-t_1^{k-1})-(t_2^{k}-t_1^{k})}\\ &\implies \color{red}{x_k= \frac{x\sin((k-2)\alpha) - \sin((k-1)\alpha)}{x\sin((k-1)\alpha) - \sin(k\alpha)}} \tag{4} \end{align}$$
Thanks to Mathematica, from $(4)$ we have: $$\begin{align} (x_{k+1}-x_k)^2 &= \left(\frac{x\sin((k-1)\alpha) - \sin(k\alpha)}{x\sin(k\alpha) - \sin(({k+1})\alpha)} - \frac{x\sin((k-2)\alpha) - \sin((k-1)\alpha)}{x\sin((k-1)\alpha) - \sin(k\alpha)}\right)^2 \\ &= \frac{(1-2\cos(\alpha)x+x^2)^2 \cdot \sin^4 (\alpha)}{(x\sin(k\alpha) - \sin(({k+1})\alpha))^2(x\sin((k-1)\alpha) - \sin(k\alpha))^2} \end{align}$$ Then $$\color{red}{A = \frac{\sin^4 (\alpha) }{2}\cdot\sum_{k=1}^m \frac{(1-2\cos(\alpha)x+x^2)^2}{(x\sin(k\alpha) - \sin(({k+1})\alpha))^2(x\sin((k-1)\alpha) - \sin(k\alpha))^2}}$$
2
$A$ reaches its minimum
$$\color{red}{A_{\min} =2\sin^4(\alpha)\cdot\sum_{k=1}^m\frac{1}{(\cos(\alpha)-\cos(2k\alpha))^2}}$$
if and only if $x$ is equal to one of these $m$ values
$$\color{red}{x = \frac{\sin\left(\left(h-\frac{1}{2}\right)\alpha\right)}{\sin\left(\left(h+\frac{1}{2}\right)\alpha\right)} \hspace{1cm }\text{for }h=1,...,m}$$
3
From $(4)$, we notice that
By consequence, we can restrict the domain to $x \in (-\infty,0)$ for finding the mimimum of $A$.
Besides, if there exists a $x^*<0$ such that $A(x^*) = A_{ \min}$, the other $m-1$ values $x_k(x^*)$ ($k=2,..,m$) also satisfy $$A(x_k(x^*)) = A_{ \min} \hspace{1cm} \text{for }k=2,...,m$$
Objective: What we need to prove $$\color{red}{\min_{x \in (-\infty,0)}A(x) = A(-1)}$$
Remark: in the domain $x\in (-\infty,0)$, graphically, $A(x)$ is a convex function and has a unique mimimum at $x = -1$.