# How to prove x^2 = xsinx + cosx

1. Mar 7, 2005

### heman

How to Prove

$$x^2 = xsinx + cosx$$

has exactly two real roots.

Will be thankful to yours bit of help.

2. Mar 7, 2005

### HallsofIvy

Staff Emeritus
1. What does this have to do with differentiability?

2. What makes you think it has any roots?

3. Mar 7, 2005

### dextercioby

Halls,it has 2 real roots.Consider the function
$$f(x)=x^{2}-x\sin x-\cos x$$

Plot it on $[0,+\infty)$.Use the fact that this function IS EVEN...

Daniel.

4. Mar 7, 2005

### shmoe

With $$f(x)=x^{2}-x\sin x-\cos x$$, try using the intermediate value theorem to show you have at least one root in $(0,+\infty)$, then use the fact that this is even (as dexter pointed out) to prove at least two roots.

Next consider what Rolle's theorem will say about the derivative of f(x) if you have more than two roots.

5. Mar 7, 2005

### saltydog

Thanks shmoe. Woulda' never though of that. Heman, write it up else I will in a day or so.

Salty

6. Mar 8, 2005

### saltydog

Using shmoe's suggestions, here's my proof:
Let:

$$f(x)=x^2-x\sin(x)-\cos(x)$$

Note that f(0)=-1 and that this is an even function which approaches infinity as x becomes unbounded in the negative and positive direction.

The function is even since:

$$f(-x)=f(x)$$

Pick an interval $[0,a]$ such that f(a)>0 for example, let a=10. Now, f(x) is continuous on this interval, thus by the Intermediate Value Theorem, for any number k between f(0) and f(a), there exists a number c between 0 and a such that f(c)=k. Thus, choose $k_1=0$. In this case $c_1$ is the root of the function. Likewise, choose a<0. Since this is an even function and is continuous in the interval$[a,0]$, there exists a $k_2$ such that $f(c_2)=0$.

Taking the derivative of f(x):

$$f^{'}(x)=x(2-\cos(x))$$

The derivative is zero only when x=0 and is always positive when x>0 and always negative when x>0. Thus, this function has only two roots.

I'd like to say "QED" but I don't think this proof is slick enough.

7. Mar 9, 2005

### mathwonk

how can it be that someone "would have never thought of" this, when it is a typical standard question and technique occurring in every cookbook calculus book in the united states?

8. Mar 9, 2005

### fourier jr

because not everyone on the forum is a prof who has been doing this stuff for years

9. Mar 9, 2005

### Tom Mattson

Staff Emeritus
Well, I'm a young calculus instructor who remembers taking these courses not so very long ago, and I get equally exasperated with my students. Not to come down too hard on our students here, but to miss that method of solution is to not have read the book carefully.

10. Mar 9, 2005

### mathwonk

it is becoming more and more apparent to me that many people on this and other such forums think that one can learn this material by searching web sites and asking questions, rather than just sitting down with a book and mastering it.

it is also very clear that the people answering these questions are the ones who have done their homework in books. if anyone out there aspires to learn this stuff well, they are seriously advised to do more reading of books by experts, and less searching of sites like wikipedia.

11. Mar 10, 2005

### heman

I am very much thankful to all of you...i got it well.

12. Mar 10, 2005

### mathwonk

well it may be late for this, but the following contains about all there is to know in differential calculus:

1) continuous functions satisfy the "intermediate value theorem". i.e. if f is continuous and assumes both negative and positive values on the same interval, then somewhere on that interval it assumes all values between those assumed values, in particular it assumes the value zero.

I.e. the continuous image of an interval is also an interval.

2) A continuous function on a closed bounded interval, assumes a maximum and a minimum.

Thus the continuous image of a closed and bounded interval is also a closed and bounded interval.

3) A continuous function cannot "change direction" except at a critical point. I.e. on any interval on which a function is differentiable, but the derivative has no zeroes, the function must be strictly monotone, either strictly increasing or strictly decreasing.

Thus on an interval without critical points, a function can have at most one zero. Hence on an interval where the function has no critical points, but takes on both positive and negative values, the function has exactly one zero. Hence a cubic polynomial with 2 critical points, and having opposite signs at these two points, has exactly three zeroes. [why?]

4) Consequently, if a function has exactly one critical point on an open interval, and goes up at both ends of the interval, then the function has a unique global minimum on the interval but no maximum.

Verbum sapienti: This is essentially the entire content of a standard differential calculus course. Thus if you are a calculus student you might wish to learn it.

Last edited: Mar 10, 2005
13. Mar 11, 2005

### saltydog

Simple, I took Calculus 20 years ago. Doing it just for fun now and as long as I dont have "homework helper", "mentor" or anything else in front of my name , I think "never woulda' though of that" is ok.

Salty

14. Mar 11, 2005

### Tom Mattson

Staff Emeritus
In that case, keep up the good work!

15. Mar 18, 2005

### DH

Ok, here is the solution
At first you take the derivative: $$y = x^2 - xsinx - cosx$$
-> y' = 2x - xcosx
We set y'= 0 to find the critical number y' = 0 when x(2-cosx) = 0
Since: -1< cosx< 1 -> 2-cosx > 0 with all x
-> y' = 0 when x = 0 , and x = 0 is the only one critical number.
At x = 0, function y has relative minimum: y min = -1
when x -> - infinity --> y > 0
when x -> infinity ---> y> 0
--> from - infinity to 0: y change the sign from + to - , there is 1 value of x at that y =0 (1)
--> from 0 to + infinity: y change the sign from + to - , there is 1 value of x at that y =0 (2)
-----------------
---> there are only two roots for the first function.