Home » Blog » Show that x^2 = x*sin x + cos x for exactly two real numbers x

Show that x^2 = x*sin x + cos x for exactly two real numbers x

Consider the equation

    \[ x^2 = x \sin x + \cos x. \]

Show that there are two values of x \in \mathbb{R} such that the equation is satisfied.


Proof. Let f(x) = x^2 - x \sin x - \cos x. (We want then to find the zeros of this function since these will be the points that x^2 = x \sin + \cos x.) Then,

    \[ f'(x) = 2x - \sin x - x \cos x + \sin x = x(2 - \cos x). \]

Since 2 - \cos x \neq 0 for any x (since \cos x \leq 1), we have

    \[ f'(x) = 0 \quad \iff \quad x = 0. \]

Then, f is continuous and differentiable everywhere, so we may apply Rolle’s theorem on any interval. So, by Rolle’s theorem we know f has at most two zeros (if there were three or more, say x_1, x_2, and x_3, then there must be distinct numbers c_1 and c_2 with x_1 < c_1 < x_2 < c_2 < x_3 such that f'(c_1) = f'(c_2) = 0, but we know there is only one c such that f'(c) = 0).
Furthermore, f has at least two zeros since f(-\pi) = \pi^2 + 1 > 0, f(0) = -1 < 0, and f(\pi) = \pi^2 + 1 > 0. Thus, by Bolzano’s theorem there are zeros between each of these points. We have that the number of zeros of f is at most two and at least 2. Hence, the number of zeros must be exactly two. \qquad \blacksquare

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):