There is an unique solution with $x$ being approximately $0.739085$. But is there also a closed-form solution?
What is the solution of $\cos(x)=x$?
159.2k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 7 best solutions below
On
Mathworld calls this the Dottie Number. The page makes no mention of existence/non-existence of "closed" form and I would guess it is still open.
On
Not a closed form but a way to generate very good approximations of the Dottie number.
Since the solution is close to $\frac \pi 4$, we have for $$y=x-\cos(x)$$ $$y=\frac{\pi -2 \sqrt{2}}{4} +\left(1+\frac{1}{\sqrt{2}}\right) \left(x-\frac{\pi }{4}\right)+\frac{1}{\sqrt{2}}\sum_{n=2}^\infty\frac{\sin \left(\frac{\pi n}{2}\right)-\cos \left(\frac{\pi n}{2}\right)}{n!}\left(x-\frac{\pi }{4}\right)^n$$ Truncating to some order $O\left(\left(x-\frac{\pi }{4}\right)^n\right)$ and using series reversion, we should get things like $$x=\frac \pi 4+\frac{32 \left(11482+8119 \sqrt{2}\right) t}{\left(2+\sqrt{2}\right)^{11}}-\frac{16 \left(4756+3363 \sqrt{2}\right) t^2}{\left(2+\sqrt{2}\right)^{11}}+\frac{32 \left(5333+3771 \sqrt{2}\right) t^3}{3 \left(2+\sqrt{2}\right)^{11}}+O\left(t^4\right)$$ where $t=\frac{1}{4} \left(\sqrt{2}-2\right) \left(4 y+\pi -2 \sqrt{2}\right)$. Making $y=0$ and using this very truncated series would give $$x \sim 0.739085133238$$ to be compared to the exact $0.739085133215$
Playing with the $n$ of $O\left(\left(x-\frac{\pi }{4}\right)^n\right)$, we could get the following results $$\left( \begin{array}{cc} n & x_{(n)} \\ 1 & \color{red}{0.739}536133515238 \\ 2 & \color{red}{0.739}100520482138 \\ 3 & \color{red}{0.739085}585917040 \\ 4 & \color{red}{0.7390851}49503943 \\ 5 & \color{red}{0.739085133}811963 \\ 6 & \color{red}{0.7390851332}38222 \\ 7 & \color{red}{0.73908513321}6073 \\ 8 & \color{red}{0.7390851332151}98 \\ 9 & \color{red}{0.73908513321516}2 \\ 10 & \color{red}{0.739085133215161} \end{array} \right)$$
Edit
For the fun of it, using the $\large 1,400$ years old approximation $$\cos(x) \simeq\frac{\pi ^2-4x^2}{\pi ^2+x^2}\qquad \text{for} \qquad -\frac \pi 2 \leq x\leq\frac \pi 2$$ solving the cubic equation $$x^3+4 x^2+\pi ^2 x-\pi ^2=0$$ gives as an approximation $$x\sim -\frac{2}{3} \left(2+\sqrt{3 \pi ^2-16} \sinh \left(\frac{1}{3} \sinh ^{-1}\left(\frac{128-63 \pi ^2}{2 \left(3 \pi ^2-16\right)^{3/2}}\right)\right)\right)=0.738305$$ that is to say a relative error of $0.1$%.
On
Your equation cannot be solved in terms of elementary functions, elementary functions and Lambert W or elementary functions and Generalized Lambert W of Mezö et al.. It can be solved in terms of "Leal-functions" and possibly by Generalized Lambert W of [Castle 2018].
1.) Elementary functions, elementary numbers
$$\cos(x)=x$$ $$\frac{1}{2}e^{ix}+\frac{1}{2}e^{-ix}=x$$ $$\frac{1}{2}e^{ix}+\frac{1}{2}e^{-ix}-x=0$$ $$\frac{1}{2}(e^{ix})^2-xe^{ix}+\frac{1}{2}=0$$ $x\to\frac{t}{i}$: $$\frac{1}{2}(e^t)^2+ite^t+\frac{1}{2}=0$$
The function on the left-hand side of the latter equation is an algebraic function in dependence of both $t$ and $e^t$. Liouville proved that such kind of functions (over a complex domain without isolated points) don't have (partial) inverses that are elementary functions.
The equation is also an algebraic equation in dependence of both $t$ and $e^t$. Lin proved, assuming Schanuel's conjecture is true, that such kind of equations don't have solutions except $0$ that are elementary numbers.
How can we show that $A(z,e^z)$ and $A(\ln (z),z)$ have no elementary inverse?
2.) Lambert W, Generalized Lambert W
The latter equation also shows that the equation cannot be solved in terms of elementary functions and Lambert W or Generalized Lambert W of Mezö et. al. either. But possibly is it solvable in terms of Generalized Lambert W of [Castle 2018].
[Mezö 2017] Mezö, I.: On the structure of the solution set of a generalized Euler-Lambert equation. J. Math. Anal. Appl. 455 (2017) (1) 538-553
[Mezö/Baricz 2017] Mezö, I.; Baricz, A.: On the generalization of the Lambert W function. Transact. Amer. Math. Soc. 369 (2017) (11) 7917–7934 (On the generalization of the Lambert W function with applications in theoretical physics. 2015)
[Castle 2018] Castle, P.: Taylor series for generalized Lambert W functions. 2018
3.) "Leal-functions"
$$\cos(x)=x$$ $$\cos(x)-x=0$$ $x\to-t$: $$t+\cos(t)=0$$ $$t=\text{Lcos}_2(0)$$ $$x=-\text{Lcos}_2(0)$$
On
Here is a closed form I just found. Using Kepler’s Equation, the median of a beta distribution, and Inverse Beta Regularized $\text I^{-1}_z(a,b)$. Here is the closed form:
$$\boxed{\text{Dottie Number}=\text D=\sin^{-1}\left(1-2\text I^{-1}_\frac12\left(\frac 12,\frac 32\right)\right)}$$
from The Incomplete Beta function $\text B_z(a,b)$:
$$\text B_{\sin^2(z)}\left(\frac 12,\frac32\right)=z+\cos(z)\sin(z)$$
taking the inverse, and a bit of algebra to get the form above. Also using the Half Covered Sine:
$$\text I^{-1}_\frac12\left(\frac 12,\frac 32\right)=\text{hacoversin}(\text {D)}=\frac12(1-\sin(\text D))\implies \text D= {\text{hacoversin}}^{-1} \text I^{-1}_\frac12\left(\frac 12,\frac 32\right) $$
With an error of $10^{-179}$ in this numerical evaluation. This is a side post since there already is an accepted answer. Please correct me and give me feedback!
See explanation here
On
I would say that it IS already in closed form... if we follow the definition given here :https://en.m.wikipedia.org/wiki/Closed-form_expression
since trigonometric functions are considered "well-known"... don't you agree?
On
My AskConstants "constant recognition" program at http://AskConstants.org proposed the explicit exact closed form
RealInverseSphericalBesselY [0, -1, 1],
where $0$ is the order and $1$ is the branch number.
This was subsequently proved in my article at https://arxiv.org/abs/2207.00707
The equation in question is a transcendental equation. Apart of guessing, numerical or analytical methods, there is no way of solving the equation without using another transcendental function, and therefore argue in circles.
In this case, denote $g(x)=\cos x -x$, see that its derivative is negative with countable many zeros, and therefore $g$ is strictly decreasing, yielding that there is at most one solution to $g(x)=0$. Since $g(0)g(\pi/2)<0$ there is such a solution. Arbitrary precise approximations can be found using Newton, bisection, or false position method.
As user Myself commented, it is a challenge (not so hard) to prove that the sequence $x_{n+1}=\cos x_n, x_0 \in \Bbb{R}$ converges to the unique solution to $\cos x=x$.
Another related problem which I encountered last week when trying to help one of my friends for an exam is to find all continuous functions $f : \Bbb{R} \to \Bbb{R}$ with the property that $f(x)=f(\cos x)\ \forall x \in \Bbb{R}$.