Find the the least integral value of a for which all the roots of the equation $x^4-4x^3 -8x^2 +a=0$ are real

By your work, we have that $f(x) =x^4-4x^3 -8x^2 +a$ is a continuous function which is strictly monotone in each one of the following intervals: strictly decreasing in $(-\infty,-1]$, strictly increasing in $[-1,0]$, strictly decreasing in $[0,4]$, and strictly increasing in $[4,-\infty)$. Now apply the Intermediate Value Theorem. For example, for $x\in(-\infty,-1]$, $f(x)$ attains once and only once each value in $(\lim_{x\to-\infty}f(x),f(-1)]=(+\infty,-3+a]$. Hence we have one root in $(-\infty,-1)$ if and only if $-3+a<0$, i.e. $a< 3$.

Can you take it from here?


Let $f(x)=x^4-4x^3-8x^2+a$, $$f'(x)=4x^3-12x^2-16x=0 \Rightarrow x=4,-1,0$$ Next $f''(x)=12x(x-2)-16.$ so $f(x)$ has local minima at at $x=4,-1$ and loca max at $x=0.$ Hence $f_{min}=a-128, a-3$, $f_{max}=a$. For four real rootss: $f_{min}<0$ and $f_{max}>0.$ Thus, for four real roots $$a \in( 0,3).$$ Both the integers $a=1,2$ are the solutions.

See the fig. for a=1, below <span class=$f(x)$ for $a=1$"> See the fig. for $a=2$, below enter image description here