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.

Hint:
Since they are both even functions, we can focus just on the positive half of the $x$-axis, and replicate our results on the other half at the end. Now,
$$g(x)=x\sin x+ \cos x\leq x\sin x + 1 \leq x + 1$$
