# no. of distinct real roots of the equation $x^2=x\sin x+\cos x$

$(1)$ The no. of Distinct real solution of the equation $x^4-4x^3+12x^2+x-1=0$

$(2)$ The no. of distinct real roots of the equation $x^2=x\sin x+\cos x$.

$\bf{My\; Try}$ For $(1)$ one:: Let $f(x) = x^4-4x^3+12x^2-x+1$.

Then $f'(x) = 4x^3-12x^2+24x-1$ and

$f''(x)=12x^2-24x+24=12[(x-1)^2+1]>0\; \forall x\in \mathbb{R}$

So Using $\bf{L.M.V.T}$ Theorem, between any two roots of $f(x),$ there is at least one

root of its derivative.

So If $f''(x)=0$ has no roots, Then $f'(x)=0$ has at most one root,

Then $f(x)=0$ has at most $2$ roots.

But How can i found that given equation has exactly $2$ roots,

and my other question is can we apply the above theorem for non polynomials equation

Help me

Thanks

In your 1st question $$f'(x)$$ has to have $$1$$ root cause it is cubic, and it's derivative is always positive, normally we try to find the root of $$f'(x)$$ and find its value and see whether it is positive or negative, but in the question we can see that the value of your original function is $$-1$$ at $$0$$ so function has to have $$2$$ roots.

Now in the second question take the right-hand side to the left-hand side and let that be a new function $$g(x)=x^2-x\sin x-\cos x$$ now $$g'(x)=2x-x\cos x=x(2-\cos x)$$ now this is negative for negative values of $$x$$ and positive for positive ones, so evaluate value of $$g(0)$$ which comes out to be negative so function will have two roots.