How many points do $f(x) = x^2$ and $g(x) = x \sin x +\cos x$ have in common? How many points do $f(x) = x^2$ and $g(x) = x \sin x +\cos x$ have in common?
Attempt:
Suppose $f(x) = g(x) \implies x^2 - x\sin x -\cos x = 0$.
Treating it as a quadratic equation in $x$, the discriminant $ = \sin^2x + 4 \cos x = 1-\cos^2x+4 \cos x = 5 - (\cos x -2)^2 \in [-4,1]$.
I don't think this was really helpful. How do I move ahead?
Thank you for your help in this regard.

It struck me that I had forgot to take into account how fast these functions were growing. So, I came up with this solution .
$h(x) = x^2 - x \sin x  - \cos x$
$\implies h~'(x) = 2x - x \cos x = x ( 2-\cos x)$
When $ x > 0 : h~'(x) > 0 $ and when $x < 0 : h~'(x) < 0 $.
$h(0) = -1$ and $h(-\pi) = \pi^2 - 1 > 0$
Hence, two solutions. One in $(-\pi,0)$ and the other at some $x > 0 $
