Calculate the limit of $a_{n+1}=\cos\pi a_n$ This is my first time to ask a question here, so I'm sorry if I make any mistake.
I'm trying to calculate the limit of $a_n$, which is defined as $a_{n+1}:=\cos\pi a_n$.
The first term is not given in this problem, so I have to prove it by cases.
I am badly stuck not knowing how to find the limit of this sequence and where to start the proof. After I substituted some values of $a1$ and calculate it, I found the convergence value might be $-1$ with almost every $a1$ (there were different ones), but I end up stuck here.
 A: Let $f(x)=\cos(\pi x)$. Then, if given $a_0$, you have that
$$a_n=f^n(a_0)$$
In order to find a limit of an iterated function in the form
$$\lim_{n\to\infty} f^n(x)$$
the first thing that you need to do is find a fixed point, and then determine whether the fixed point is an attractor or a repeller. To find the fixed point, you must solve the equation
$$\cos(\pi \theta)=\theta$$
Which, unfortunately, has three solutions, one of which is elementary, and the other two of which are transcendental. The elementary solution is 
$$\theta=-1$$
and the transcendental ones are about
$$\theta\approx-0.79,0.38$$
And so the limit can take on any of these three values, depending on the value of $a_0$.
However, sometimes, the sequence has no limit. The sequence can enter a cycle depending on $a_0$, because there exist $a,b$ such that $a \ne b$ and
$$\cos \pi a=b$$
and
$$\cos \pi b=a$$
In general, though, most initial values $a_0$ will result in a limit of $-1$, since $x=-1$ is the only attracting fixed point of the three, and, in fact, is a superattracting fixed point, since $f'(-1)=0$. The other two fixed points have
$$|f'(x)|\ge 1$$
and are thus repelling fixed points.
A: Hint: All limit points (if a limit exists) satisfy 
$$\cos(\pi x) = x$$
(that is, if we started with a point that is a limit point, the sequence would be constant).
Edit: Numerically, it seems that the sequence converges to $-1$ for almost all values of $a_1$ (the two other fixed points of $\cos(\pi x)$ are some examples of $a_1$ for which it doesn't converge to $-1$).
