0

I have to find the solution of the equation $x=\cos(x)$, $x$ is real. I solved it graphically but is there any other way to solve this except numerical approximation?

I have seen the Dottie number question asked on this page but I am curious about other equations like $x=\sin(x)$. [I know the solution is $x=0$], $x=\sec(x)$ etc., and also when a function $x-f(x)$ has a zero?

Clayton
  • 24,751
  • 4
    You can show the existence of a solution by the Intermediate Value Theorem. To find a solution I only know of numerical estimates, not exact solutions. (That's only my knowledge: others may know more.) – Randall Apr 11 '18 at 15:51
  • 2
    no, there is not. It is a stable fixed point problem because the derivative at the fixed point has absolute value smaller than one. – Will Jagy Apr 11 '18 at 15:52
  • 1
    The constant is called Dottie's number and there's no known closed form. – Jam Apr 11 '18 at 15:54
  • 1
    $\cos\left(x\right) - x = 0$ $\texttt{Bisection Method}$ in $\left[0,\pi/2\right]$ is your 'friend'. – Felix Marin Apr 11 '18 at 16:11

1 Answers1

1

Hmm. If we traverse into complex numbers, we could try something like this: \begin{align*} \cos(x)&=x \\ \text{Re}[e^{ix}]&=x \quad \text{Expand into complexes temporarily:}\\ e^{ix}&=x\\ x \,e^{-ix}&=1 \\ -ix \, e^{-ix}&=-i \\ -ix&=W(-i) \\ x&=i \,W(-i)\quad \text{Getting back to the reals:} \\ x&=\text{Re}\left[i\,W(-i)\right]. \end{align*} Here $W$ is the Lambert $W$ function. However, this approach simply doesn't work. The numerical value of the final result is approximately 0.576, whereas the actual Dottie number is closer to 0.739. I suspect the problem is where we assume we can just go to the complexes, and then come back out of them without any penalty. Indeed, some numerical experiments in the Wolfram Dev Platform indicate that this is so. Expanding into the complexes, where we remove taking the real part, gets us into the wrong answer.

In summary, I would go with @Felix Marin's comment, and use bisection.

Adrian Keister
  • 10,099
  • 13
  • 30
  • 43