Solve $x^2-\cos(x)=0$

964 Views Asked by At

I don't know how to solve this: $$x^2-\cos(x)=0$$ I know it's easy but I don't know how to start.


My attempt

As I've already said, I don't know how to start but this is what I tried.

$$x^2-\cos(x)=0$$ $$x^2=\cos(x)$$ $$x^4=\cos^2(x)$$ $$x^4=\frac{1}{\tan^2(x)+1}$$ $$\tan^2(x)x^4=\frac{\tan^2(x)}{\tan^2(x)+1}$$ And it goes on and on and on... nowhere. What I find hard is that the first term is a variable and the second one is trigonometric function and because of that I can't find a "common ground" i.e. a way that I can manipulate with them at the same time.

5

There are 5 best solutions below

0
On BEST ANSWER

It unfortunately does not have a nice solution. We can rearrange it to get: $$x=\sqrt{\cos(x)}$$ then iterate: $$x_{n+1}=\sqrt{\cos(x_n)}, x_0=1$$ To find an approximate solution of $x\approx 0.8241323123$.

Then we can also note that the negative of this holds, so $x\approx\pm0.8241323123$

2
On

The solutions are symmetric under $x\mapsto -x$, and satisfy $|x|\le 1$. Solve $x^2-\cos x=0$ on $[0,\,1]$ with the Newton-Raphson method. The sign change from $-1$ to $1-\cos 1$ confirms a root. In fact this interval contains only one root, because $2x+\sin x\ge 0$ therein.

0
On

Some preliminary observations

One can observe immediately that since $|\cos(x)|\leq 1$, the roots must lie in the interval $[-1,1]$. Furthermore, it suffices to find the root in $[0,1]$ since the function $x^2-\cos x$ is even. Moreover, there can be at most one root in $[0,1]$ since cosine is decreasing on $x^2$ is increasing on $[0,1]$.

I don't think it can be solved algebraically. Wolfram gives $0.824$ as the positive root.

0
On

To get a approximate solution you can use the Taylor expansion $\cos( x )= 1 - \frac{1}{2}x^2 + O(x^4)$

$x^2 - \cos(x) = \frac{3}{2}x^2 -1 + O(x^4)= 0$

Then $x \approx \pm\sqrt{2/3} \approx \pm 0.817$

The relative error is less than 1% compared to the method in the answer from Rhys Hughes. But note that you have to pay attention by using the Taylor expansion as the solution $x$ does not have to be small ($0.8$ is acutally quite big) and the solution can be completly wrong. In this case we have been lucky.

0
On

Newton's method or input the function $y = x^2 - \cos(x)$ into your graphing calculator and determine the value of the zero for the x intercept$ \ (.82413231)$