# How do you solve cos x = x?

Feb 20, 2018

Use Newton's method to find:

$x \approx 0.73908513322$

#### Explanation:

Looking at the graphs of $y = x$ and $y = \cos x$ we see that there is exactly one real solution, actually somewhere in $\left(\frac{1}{2} , 1\right)$:
graph{(y-x)(y-cos x) = 0 [-5, 5, -2.5, 2.5]}

Typically for such an equation with mixed polynomial and trigonometric terms, there is no algebraic solution.

We can use Newton's method to get a sequence of increasingly better approximations.

Let:

$f \left(x\right) = x - \cos x$

Then:

$f ' \left(x\right) = 1 + \sin x$

Newton's method tells us that if we have an approximation ${a}_{i}$ to a zero of $f \left(x\right)$ then a better approximation is given by:

${a}_{i + 1} = {a}_{i} - \frac{f \left({a}_{i}\right)}{f ' \left({a}_{i}\right)}$

Choosing ${a}_{0} = 1$ as our first approximation, we find:

${a}_{1} = {a}_{0} - \frac{{a}_{0} - \cos {a}_{0}}{1 + \sin {a}_{0}} \approx 0.75036386784$

${a}_{2} = {a}_{1} - \frac{{a}_{1} - \cos {a}_{1}}{1 + \sin {a}_{1}} \approx 0.73911289091$

${a}_{3} = {a}_{2} - \frac{{a}_{2} - \cos {a}_{2}}{1 + \sin {a}_{2}} \approx 0.73908513339$

${a}_{4} = {a}_{3} - \frac{{a}_{3} - \cos {a}_{3}}{1 + \sin {a}_{3}} \approx 0.73908513322$

${a}_{5} = {a}_{4} - \frac{{a}_{4} - \cos {a}_{4}}{1 + \sin {a}_{4}} \approx 0.73908513322$

So you can see that the approximations converge quite rapidly.