If $f(x)=x^2$ and $g(x)=x\sin(x)+\cos(x)$ then i have to find number of points$(x)$ such that $f(x)=g(x)$
I write $h(x)=f(x)-g(x)$. So $h(x)=x^2-x\sin(x)-\cos(x)$
$h'(x)=x(2-\cos(x))$. Since $2-\cos x$ is bounded so By taking limits as $x$ goes to plus and minus infinity $h'(x)$ goes to plus and minus infinity.which means $h$ has root in between. I am not sure
Note that $h(0)=-1\neq 0$. Therefore, in case of $x$ is a root of $h$, then $x>0$ or $x<0$. Also, $\lim_{x\to\pm\infty}h(x)=\pm\infty$ (Prove it!)...(*)
If $x>0$, then $h^\prime(x)>0$, so $h$ is an increasing function on $(0,\infty)$, anb by continuity, also it is on $[0,\infty)$. But $h(0)<0$ and using (*) we conclude that there is a unique root of $h$ in $(0,\infty)$ (Intermediate Value Theorem and monotonicity).
Finally, an analogous argument shows that there is a unique root of $h$ in $(-\infty,0)$. Another way to conclude this is noting that $h$ is an even function.
Conclusion: there are exactly two roots of $h$.