Find the number of solutions for this trig-algebraic equation: $x^2 -x \sin x – \cos x =0$

inequalitytrigonometry

The number of points in $(-\infty, \infty)$ for which $x^2 -x \sin x – \cos x =0$, are?

The first thought that came to my my mind was that the equation above is looking like a algebraic quadratic equation, and those equations have at most two different solutions. But this equation is the mixture of algebraic and trigonometric functions. Having some experience with a similar problem I proceeded like this
$$
x^2 – x \sin x = \cos x \\
x(x- \sin x ) = \cos x$$

$$
-1 \leq \cos x \leq 1 \\
-1 \leq x(x-\sin x ) \leq 1 $$

$$x(x-\sin x ) = -1 \tag{1}$$
$$x(x-\sin x ) = 1 \tag{2}
$$

$$
x-1 \leq x – \sin x \leq x+1 \tag{i}$$

$$x-1 \leq -\frac{1}{x} \leq x+1 ~~~~~~~~~~\text{from equation (1)} \\
x-1 = \frac{-1}{x} ~~~~~~~~~~~~; ~~~~~~~~~~~~~~ x+1 = \frac{-1}{x} \\
x^2 – x +1 =0 ~~~~~~~~~~~~; ~~~~~~~~~~~~~~ x^2 + x +1 = 0$$

Above two equations have no real solutions.

From equation (2) and inequality (i), we have
$$
x-1 = \frac{1}{x} ~~~~~~~~~~~ ; ~~~~~~~~~~~ x+1 = \frac{1}{x} \\
x^2 – x -1 = 0 ~~~~~~~~~~~ ; ~~~~~~~~~~~ x^2 + x -1 = 0$$

So, above two equations have two different solutions each, so in total we have four distinct values of $x$. But this answer of mine is not correct, drawing the graph from desmos shows there are just two intersections of $x-axis$.

I'm in need of an explanation of why my solution is giving a wrong answer, and I have two more questions:

  1. I felt suspicious when I equated $x(x-\sin x) = \{1, -1\}$, because what the inequality says is that $x(x-\sin x)$ lies between $-1$ and $1$, so I could very well equated $x(x-\sin x)$ to any number in between $[-1 , 1]$ but I did not. Could I equate it with any number in between?
  2. The solutions of the last two quadratic equations differ from the other's pair only in signs, so it seems to me that there is some minor issue but cannot find it. Is there a specific reason that I'm off to actual answer just due to the consideration of signs?

Best Answer

Hint: if $f(x) = x^2 - x \sin(x) - \cos(x)$, show that $f'(x) > 0$ for $x > 0$ and $< 0$ for $x < 0$.