Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a homework question to prove that

$$x \sin x+\cos x=x^2$$

has only one positive solution.

I have easily proved that it has a positive answer by showing that $f(x)=x\operatorname{sin}x+\operatorname{cos}x-x^2$ is smaller then $0$ at $f(\frac{\pi}{2})$ and larger then $0$ at $f(0)$ and then using the Intermediate Value Theorem.

But I am having trouble proving this is the only positive solution. Can someone help me with this? Thanks :)

share|cite|improve this question
Examine the derivative of $f$. – Mikko Korhonen Jan 13 '12 at 12:21
... and use Rolle's theorem. – lhf Jan 13 '12 at 12:23
Ah Thanks guys - the Rolle's theorem tip helped a lot. – Jason Jan 13 '12 at 12:36
up vote 2 down vote accepted

Let $f(x)=x\sin x+\cos x-x^2$. Then $f(-\pi/2)<0$, $f(0)>0$ and $f(\pi/2)<0$. Hence by the Intermediate Value Theorem, $f$ has at least two zeros. Since $f'(x)=\sin x+x\operatorname{cos}x-\operatorname{sin}x-2x = x\operatorname{cos}x-2x=x(\cos x-2)$, it has only one zero. Therefore $f$ has exactly two zeros where one of them is positive and one of them is negative.

share|cite|improve this answer
I think you need $-2x$ there. Also, another way: since $x \cos x - 2x = x (\cos x - 2)$ is negative when $x > 0$, we know that $f$ is strictly decreasing in $]0, \infty[$. Thus $f$ has at most one positive root by continuity. – Mikko Korhonen Jan 13 '12 at 13:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.