How do you solve cos x = x?

1 Answer
Feb 20, 2018

Use Newton's method to find:

x ~~ 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 (1/2, 1):
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(x) = x - cos x

Then:

f'(x) = 1 + sin x

Newton's method tells us that if we have an approximation a_i to a zero of f(x) then a better approximation is given by:

a_(i+1) = a_i - (f(a_i))/(f'(a_i))

Choosing a_0 = 1 as our first approximation, we find:

a_1 = a_0 - (a_0 - cos a_0)/(1+ sin a_0) ~~ 0.75036386784

a_2 = a_1 - (a_1 - cos a_1)/(1+sin a_1) ~~ 0.73911289091

a_3 = a_2 - (a_2 - cos a_2)/(1+sin a_2) ~~ 0.73908513339

a_4 = a_3 - (a_3 - cos a_3)/(1+sin a_3) ~~ 0.73908513322

a_5 = a_4 - (a_4 - cos a_4)/(1+sin a_4) ~~ 0.73908513322

So you can see that the approximations converge quite rapidly.