Is there an analytic solution for such problem?

Given function $$f_n(x) = \cos x - (\cos \cos x) + (\cos \cos \cos x) - (\cos \cos \cos \cos x) + \dots + (-1)^{n-1} \underbrace{ \cos \cos \dots \cos }_n x,$$ where $$n \in \mathbb{N}$$ and $$\underbrace{ \cos \cos \dots \cos }_n$$ means cosine of cosine of cosine and so on $$n$$ times, find value of $$\sup_{n \rightarrow \infty, x \in \mathbb{R}} \{f_n(x)\}^{n}_{k=1}$$

• Probably won't be much help but it seems that as n gets large the last terms will send to a maximum of around 0.74. Oct 9 '18 at 0:02
• The value 0.74 is close to the root of $\cos x = x$. Oct 10 '18 at 4:48
• I think that this is deeply related to recurrence relations since we can define the problem as the evaluation of the series $\sum_{n\in\mathbb{N}} \left(\left(-1\right)^{n-1}{c_n\left(x\right)}\right)$ where $c_0(x)=x$ and $c_n(x)=\cos\left(c_{n-1}(x)\right)$. Adding the tag can give this post most more visibility to the recurrence relations experts Jan 10 '19 at 14:13
• The supreme is about 1.5708. It is heavily depend on the value of the first term, so we take $x=0$, then we can get the supreme. Sep 25 '19 at 9:15
• Notice that $\frac{\pi}2 \approx 1.5708$. Also, this is the value of an infinite series, and I believe that @mathon is correct in assuming the supremum occurs at $x = 0$.
– KenM
Jan 31 '21 at 23:34

This is not a full answer, but should help you to derive bounds for the value in both directions.

Split the sum $$\sum_{n=1}^\infty (-1)^{n-1} \cos^n(x)$$ into a finite part of leading terms with odd length and the remaining higher terms $$\sum_{n=1}^\infty (-1)^{n-1} \cos^n(x) = \sum_{n=1}^{2N +1} (-1)^{n-1} \cos^n(x) + \sum_{n=2N+2}^\infty (-1)^{n-1} \cos^n(x).$$

The maximum of the first part ($$f_{2N+1}$$) is at $$x=0$$ and can be bounded in both directions. The supremum of the sequence is thus also attained at (or rather in a neighborhood of) $$x=0$$. This follows from the following approximation for the remaining terms (or more precisely, from a concrete bound that should be obtainaned from it).

For the remaining terms, observe that the sequence $$\cos^n(x)$$ converges to a unique fixpoint for all $$x \in \mathbb{R}$$, the unique solution $$x_0$$ of $$\cos x = x$$. The summands are thus almost equal up to their alternating signs. We "transform coordinates" and instead work with the summands $$\pm \cos^n(x) - x_0$$.

Let $$r = |(\frac{d}{dx} \cos)(x_0)| = |\sin(x_0)|$$. Then $$r$$ is the convergence order of $$\cos^n(x) \to x_0$$, i. e. $$\Delta_n := |\cos^n(x) - x_0| \approx \Delta_0 r^n.$$ (This follows by a first-order Taylor approximation of the recurrence equation around $$x_0$$.)

For the remaining terms we thus get approximately \begin{align*} &\sum_{n = N + 1}^\infty (\Delta_{2n} - \Delta_{2n+1}) \\ = &\sum_{n = N + 1}^\infty (1-r) \Delta_{2n} \\ = &(1-r) \Delta_{2N + 2} \sum{n = 0}^\infty r^2 \\ = &\Delta_{2N+2} \frac{1-r}{1-r^2} \\ = &\Delta_{2N+2} \frac{1}{1+r}. \end{align*}

Concerning the question of an analytic form and whether the value is expressible in terms of $$\pi$$ I am inclined to say no to both. According to a calculation with Sage with 2000 bits of precision, the value has long since stabilized at $$f_{10001}$$ and differs from $$\pi/2$$ by about 3.9e-5.

Already the solution of $$\cos(x) - x=0$$ should be transcendental and not expressible in the standard transcendental functions, but such proofs are in general incredibly difficult.