# How many real solutions does this equation have? $x^2 + \cos x = 15$

How many real solutions does this equation have? $$x^{2} + \cos(x) = 15$$

Another task from an old exam I'm not sure how to solve!

The first thing that came to my mind was the well known and easy p-q-formula.

But I didn't know how to apply that formula if we got a cos. We cannot just write:

$$x_{1,2} = -\frac{\cos}{2}+- \sqrt{\left (\frac{\cos}{2} \right )^{2}+15}$$

Is there even one solution? I don't think.. We could get +- 14 as solution but never 15.

• There is always at least one solution since 0+cos(x) < 15 and 10^2+cos(10) > 15 and the function is continuous – ctst Sep 5 '16 at 21:44

Let $f(x)=x^2+\cos(x)-15$. You have that $f'(x)=2x-\sin(x)$.

$$f'(x)=0\implies 2x=\sin(x)\implies x=0.$$ Moreover $f''(0)=1>0$, and thus $f(0)$ is a minimum. Since $f(0)=-14$ and that $\lim_{x\to \pm \infty }f(x)=+\infty$, you will have only two solution at the equation $f(x)=0$.

• So what did you do exactly? I see you calculate the extremum? So extremum is at $E(0|-14)$ Is minimum? Ok you find minimum, then find limit of function, it's $+ \infty$. And then..? I don't understand end maybe you can say some more pls? How you know there is solution at $f(x) = 0$? – cnmesr Sep 5 '16 at 21:46
• But then the function is strictly decreasing between $(-\infty ,0]$ and $[0,+\infty )$ (since $f'(x)<0$ when $x< 0$ and $f'(x)>0$ when $x>0$). Moreover, the fact that $\lim_{x\to \pm \infty }f(x)=+\infty$ and $f(0)<0$ gives you the existence of a solution of $f(x)=0$ on $(-\infty ,0]$ and a solution on $[0,+\infty )$. The strictly monotony (and thus the injectivity) on each interval gives you the unicity. @cnmesr – Surb Sep 5 '16 at 21:49
• Wow very complicated but I understand a bit, thank you a lot for explain me and also thank all other answer :) – cnmesr Sep 5 '16 at 21:51
• @cnmesr: Difficult to make easier ;-) – Surb Sep 5 '16 at 21:51
• I don't mean your description, I mean the way is done. I try understand tomorrow now go sleep ^^ – cnmesr Sep 5 '16 at 21:52

Notice that once $|x| > 1/2$ the function $x\mapsto x^2 + \cos(x)$ is $1-1$.

• Sorry, but I don't understand your post... If I set $g(x)=x^2+\cos(x)$, then $g(1)=g(-1)$, and thus it's note $1-1$ on $|x|>\frac{1}{2}$. By the way, for all $x\in\mathbb R$, $g(x)=g(-x)$... – Surb Sep 5 '16 at 21:50
• In both intervals. – ncmathsadist Sep 5 '16 at 22:42
• In toto, it's 2-1. – ncmathsadist Sep 5 '16 at 22:43

The function is even and we can limit the study to positive solutions.

As $-1\le\cos x\le 1$, the roots will be "bracketed" by those of $x^2+t=15$ with $t\in[-1,1]$, hence

$$x=\sqrt{15-t}\in[\sqrt{14},4].$$

In this range, the derivative $2x-\sin x$ certainly remains positive and the function is strictly increasing, hence has a single root.