Does the alternating composition of sines and cosines converge to a constant?

Yes—this is a question in dynamical systems, if you're looking for words to search with.

In this case, the equation $f(x)=x$ has exactly one fixed point (near $x=0.76817$), and at that fixed point we have $|f'(x)| \approx 0.46046 < 1$; therefore it is an attracting fixed point, which means that every sequence of iterates of $f$ will approach the fixed point exponentially fast.


For the limit $f$ it must hold: $f(x)=\cos(\sin(f(x)))$. Taking the derivative (assuming $f$ differentiable) implies:

$f'(x)=-\sin(\sin(f(x)))\cos(f(x))f'(x)$

Impliing either $f'(x)=0$ or $1=-\sin(\sin(f(x)))\cos(f(x))$

The last equation can only hold if $f(x)=k\pi$ for $k\in \mathbb{Z}$ but this implies $\sin(\sin(f(x)))=0$, contradiction. So $f$ must be constant (or not differentiable).

You can show that a constant solution exists by Banach Fixpoint theorem on the sequence

$x_{n+1}=\cos(\sin(x_n))$


This question can be settled by some elementary analysis. Note that $$\begin{aligned} I:=f(\mathbb R)&=\cos(\sin(\mathbb R))=\cos([-1,1])=[\cos(1),1]=[0.540,1],\\ f(I)&=\cos\left(\sin\left([0.540,\,1]\right)\right)\\ &=\cos([0.514,\,0.841])\\ &=[\cos(0.841),\,\cos(0.514)]\\ &=[0.666,\,0.871]\subset I. \end{aligned}$$ So, if $f$ has any fixed point, the fixed point must lie inside $I=[\cos(1),1]$.

Let $g(x)=f(x)-x$. Since $g(\cos(1))=0.330>0>-0.334=g(1)$, by the intermediate value theorem, $g$ has a zero on $I$, i.e. $f$ has a fixed point on $I$. As $g'(x)=-\sin(\sin(x))\cos(x)-1<0$, the fixed point of $f$ is also unique. Finally, on $I=[\cos(1),1]$, as $$|f'(x)|=| \sin(\sin(x))\cos(x)|\le|\sin(\sin(x))|\le|\sin(\sin(1))|=0.746<1,$$ the fixed point is attractive. Therefore, if we denote the $n$-fold composition of $f$ by $f^n$, the sequence $(f(x),f^2(x),f^3(x),\ldots)$ must converge to the fixed point of $f$.