The number of distinct real roots of a polynomial I have trying to solve this problem for a long time now. After having read related concepts, I am still stuck. The problem is as follows-
Find the number of distinct real roots of the equation
$$x^4-4x^3+12x^2+x-1=0$$
I tried to use Descartes' sign rule, but it gives a limit rather than an exact answer. I can safely say that the above equation has at least one root in the interval $[0,1]$ as $f(0)<0$ and $f(1)>0$. But I don't know how to proceed. Maybe some ideas from the differential calculus need to be applied.
Please give a clear solution or an approach such kinds of problems.
Thank You..
 A: Let $$f(x)=x^4-4x^3+12x^2+x-1\;,$$ Then $$f'(x) = 4x^3-12x^2+24x$$
and $$f''(x)=12x^2-24x+24 = 12(x^2-2x+2)=12[(x-1)^2+1]>0\;\forall \;x\in \mathbb{R}$$
Now Using Rolles Theorem If $f(x)=0$ has $n$ real Roots, Then $f'(x)=0$ has at least $n-1$ real roots
and $f''(x)=0$ has at least $n-2$ real roots.
Or in other words If $f''(x)=0$ has $n$ roots, Then $f'(x)=0$ has at most $n+1$ roots
and $f''(x)=0$ has at most $n+1$ roots.
Now here $f''(x)=0$ has no real roots, Then $f'(x)=0$ has at most one real root and $f(x)=0$
has at most $2$ real roots.
Now Here $f(0)=-1$ and $f(1)=9$. So one root lie between $(0,1)$
and $f(-1)=15$ and $f(0) = -1$. So other root lie between $(-1,0)$
So $$f(x)=x^4-4x^3+12x^2+x-1 =0$$ has exactly two real roots.
A: Sturm's theorem to the rescue!
Let's denote the polynomial in question by $p$, so that
$$p=x^4-4x^3+12x^2+x-1.$$
We first convince ourselves that the polynomial is square free, which it is because $\gcd(p,p')=1$. (If this were not the case, we would have needed to replace $p$ by $\frac{p}{\gcd(p,p')}$ in the subsequent steps.)
Next, we form a Sturm sequence associated with $p$:
$$
\begin{aligned}
p_0 &= p = x^4-4x^3+12x^2+x-1 \\
p_1 &= p' = 4x^3-12x^2+24x+1 \\
p_2 &= -\operatorname{rem}(p_0,p_1) = -3x^2-\frac{27x}{4}+\frac{3}{4} \\
p_3 &= -\operatorname{rem}(p_1,p_2) = -\frac{289x}{4}+\frac{17}{4} \\
p_4 &= -\operatorname{rem}(p_2,p_3) = -\frac{99}{289}.
\end{aligned}
$$
Let $\sigma(a)$ be the number of sign changes (the so called variation) in the sequence $p_0(a),\ldots,p_4(a)$. By Sturm's theorem, the number $r$ of real roots of $p$ can now be computed as
$$r=\sigma(-\infty)-\sigma(\infty)=3-1=2.$$
A: Using Graph::Let $y=f(x)=x^4-4x^3+12x^2+x-1=0\Rightarrow y=x^4-4x^3+12x^2=1-x$
Draw graph of $y=x^4-4x^3+12x^2$ and $y=1-x$
Now we can draw graph of these two curve easily.

Now hare we have seen these two curve intersect each other at two distinct points..
So Number of distinct real solution of $f(x)=x^4-4x^3+12x^2+x-1=0$ is equal to $\bf{two}$
A: Using Descartes Rule we get the possibilities of only $2$ real roots or none. And since $f(0)<0$ and $f(\infty)=f(-\infty)=\infty$ so $2$ real roots are confirmed. 
A: Since the degree of the polynomial and its coefficients are reasonably small, we might also consider ways of "decomposing" the polynomial.  (The argument here is made without calculus:  it is less efficient, but is intended to show what can be managed nonetheless.)
If we consider just the "even-function" portion, we see that $ \ x^4 + 12x^2 - 1 \ = \ 0 \ \ $ involves a biquadratic function, so its zeroes are given by
$$ x^2 \ \ = \ \ \frac{-12 \ \pm \ \sqrt{144 \ + \ 4}}{2} \ \ = \ \ -6 \ \pm \ \sqrt{37} \ \ , \ \ $$
which tells us that there are just two real zeroes, $ \ \pm  \sqrt{ \ \sqrt{37} \ - \ 6} \ \approx \ \pm 0.2877 \ \ . $ [If one does not have a calculator, one might use the binomial approximation to obtain
$$ \ \sqrt{37} \ - \ 6 \ \ = \ \ (36 + 1)^{1/2} \ - \ 6 \ \ = \ \ 6·\left(1 + \frac{1}{36} \right)^{1/2}   \ - \ 6 \ \ = \ \ 6·\left(1 + \frac12·\frac{1}{36} - 1 \right)    \ - \ 6 \ \ \approx \ \ \frac{1}{12} \ \ , $$
placing the real zeroes at $ \ \pm \frac{1}{2 \sqrt3} \ \approx \ \pm \frac{1}{3.4} \ \approx \ \pm 0.3 \ \ . $ ] It should also be observed that the range of the function is $ \ [ -1 \ , \ 12] \ $ in the interval $ \ [-1 \ , \ 1] \ \ . $
We then consider the "odd-function" portion $ \ x -  4x^3 \ \ . $  Over the interval $ \ [-1 \ , \ 0 ] \ \ , $ this is positive, so it will "raise" this part of the function curve; over $ \ [ 0 \ , \ 1 ] \ \ , $ the curve is lowered.  But we find that $ \ |x - 4x^3| < \frac13 + \frac{4}{27} = \frac{13}{27} \ $ over $ \ \left[-\frac13 \ , \ \frac13 \right] \ $  (in fact, it is considerably less) and $ \ |x - 4x^3| < 3 \ $ over $ \  [-1 \ , \ 1 ] \ \ .  $  So the "odd" terms "break" the symmetry of the "even-function", but not by enough to introduce a new $ \ x-$ intercept: the zeroes of $ \ x^4 + 12x^2 - 1 \ $ are simply "shifted to the right" by small amounts.  Hence, $ \ x^4 - 4x^3 + 12x^2 + x - 1 \ = 0 \ \ $ also has just two real roots.  [The graph below shows the even-function in green, the odd-function in red, and the complete polynomial in blue.]

Concerning the argument given by juantheron, his calculation for the second derivative
$$ f''(x) \ \ = \ \  12[(x-1)^2 \ + \ 1] \ > \ 0 \ \;\forall \;x\in \mathbb{R}$$
almost tells the whole story right there.  We know that for this quartic polynomial
$$ \ \lim_{x \ \rightarrow \ \pm \infty} \ x^4 - 4x^3 + 12x^2 + x - 1 \ \ = \ \ + \infty \ \ ; $$
that since it is continuous and differentiable everywhere, the Intermediate Value Theorem shows us that there are zeroes in the intervals $ \ \left( -\frac12 \ , \ 0 \right) \ $ and $ \ \left( 0 \ , \ \frac12 \right) \ \ ; $ and, hence, that there must be a "turning-point" in $ \ \left( -\frac12 \ , \ \frac12 \right) \ \ . $  As the second derivative indicates that this function is "concave upward" everywhere, there can be no other turning-points, and so no possible "return" to the $ \ x-$ axis.  If there is any further concern, the first derivative $ \ f'(x) \ = \ 4x^3 - 12x^2 + 24x \ = \ 4x · (x^2 - 3x + 6) \ = \ 4x · \left[ \ \left(x - \frac32 \right)^2 + \frac{15}{4} \ \right] \ $ is non-zero except at $ \ x = 0 \ \ , $ so the two real zeroes only have multiplicity one.
$$ \ \  $$
Incidentally, in a later post on this same polynomial equation [ The number of distinct real roots of a polynomial of degree 4 ], it was remarked by the poster that this problem comes from an (unspecified) "competitive exam".  While searching for that online, I found that there are a number of other sites where this problem is discussed:
https://www.quora.com/How-can-I-find-number-of-distinct-real-roots-of-x-4-4x-3+12x-2+x-1-0
https://www.youtube.com/watch?v=N8_HD4yqqkE
https://selfstudy365.com/qa/the-number-of-distinct-real-roots-of-x44x3+12x2+x10-152366
https://www.sarthaks.com/563290/the-number-of-distinct-real-roots-of-x-4-4x-3-12x-2-x-1-0-is
https://www.toppr.com/ask/en-ae/question/the-number-of-distinct-real-roots-ofx4-4x3-12x2-x-1/
etc.  This particular polynomial seems rather widely (re-)used for some reason.  (I haven't located the purported exam source.)
