# How to tell that $x^2 - x \sin(x) -\cos (x)$ has no real roots?

Putting the equation $x^2 - x \sin(x) - \cos (x)$ into Wolfram Alpha, I am surprised that it has a nice parabolic shape. Also, it has two complex roots.

Question

Is it possible to tell, in a simple way, that it has no real roots?

-
But it does have two real roots! And obviously so, since the expression is $-1$ when $x=0$, while it is approximately $x^2$ when $|x|$ is large. –  Harald Hanche-Olsen Sep 17 '12 at 18:26
It may be nice, but it's not as parabolic as a parabola :) –  rschwieb Sep 17 '12 at 18:30
@rschwieb OP could have used the word "paraboloid", if mathematicians of the past hadn't already squandered that word on something else. –  MJD Sep 17 '12 at 19:00
This is not the first time I have seen W|$\alpha$ produce a completely insane result. –  MJD Sep 17 '12 at 19:02
@rschwieb: from the posted link: "Result: (no real solutions)" –  Ben Millwood Sep 17 '12 at 19:06

$f(x) = x^2-x\sin x-\cos x$ is even, $f(0) < 0$ and $\lim_{x \to \infty} f(x) = \infty$, hence the equation has at least two real roots. Also, $f'(x) = x(2-\cos x)$ satisfies $f'(x) \geq x \geq 0$ for $x \geq 0$, hence these are the only real roots.

-
Thanks for the help! :) –  Legendre Sep 17 '12 at 19:41

$f(0)=-1$ and $f(2)=4-2\sin(2)-\cos(2)\geq 4-2-1=1 \,.$

Then, by IVT it has a root between $0$ and $2$. Similarly, it has a second root between $-2$ and $0$.

-
Doh...I should have known to do this. :S Well, thanks! –  Legendre Sep 17 '12 at 19:40

I think you are confused by treating this as a standard quadratic which can only have two real roots or a pair of conjugate complex roots. But this is not. As others commented it is more appropriate to use calculus to detect the distribution of roots on the real line. In the complex case your equation become $$z^{2}-z\frac{e^{iz}-e^{-iz}}{2}-\frac{e^{iz}+e^{-iz}}{2}$$ this equation is trancendatal and probably do not have easy solutions.

-
I see. Thanks for the comment! +1 :) –  Legendre Sep 17 '12 at 19:40