Find all values of the real parameter $a$ for which the equation $4x^4+(8+4a)x^3+(a^2+8a+4)x^2+(a^3+8)x+a^2=0$ has only real roots 
Find all values of the real parameter a for which the equation $$4x^4+(8+4a)x^3+(a^2+8a+4)x^2+(a^3+8)x+a^2=0$$ has only real roots.

Obviously as soon as you factor this equation to $$(4x^2+8x+a^2)(x^2+ax+1)=0$$ then you have finished.
However, how am I supposed to think of factoring the equation in such a manor? That you are supposed to factor it, is obvious, but how can you find out which are its factors, aside from blind luck?
 A: Rewrite it as a polynomial in $a$:
$$ a^3 x + a^2 (x^2 + 1) + a ( 4x^3 + 8x^2 ) + (4x^4 + 8x^3 + 4x^2 + 8x) = 0.$$
The factorization almost immediately jumps out by observation:
$$ (a^2 + 4x^2 + 8x ) ( ax + x^2 + 1) = 0 $$

The idea of changing the variable is a common trick. It can be helpful when factoring (e.g. applying the Reminder Factor Theorem), or finding real roots (e.g. apply the quadratic discriminant to another variable).
As an example, try to factorize $ a^4 + b^4 + c^4 - 2a^2b^2 - 2b^2c^2 - 2c^2a^2$.
There are numerous approaches that one can use, so in the spirit of this question, consider it as a quadratic in $a^2$ first.
A: Observing and categorizing the coefficients can be effective here.
Rewrite the equation into
$$(4x^4+8x^3+a^2x^2)+(4ax^3+8ax^2+a^3x)+(4x^2+8x+a^2)=0\\\Longrightarrow x^2(4x^2+8x+a^2)+ax(4x^2+8x+a^2)+(4x^2+8x+a^2)=0\\\Longrightarrow (x^2+ax+1)(4x^2+8x+a^2)=0$$
Or in this way:
$$(4x^4+4ax^3+4x^2)+(8x^3+8ax^2+8x)+(a^2x^2+a^3x+a^2)=0\\\Longrightarrow 4x^2(x^2+ax+1)+8x(x^2+ax+1)+a^2(x^2+ax+1)=0\\\Longrightarrow (4x^2+8x+a^2)(x^2+ax+1)=0$$
Does this help? I'm not sure if you are asking for a general way or  just for this one problem.
A: I doubt this is the intended solution but here it is anyway.
The main tool is the discriminant. Wikipedia says:

The discriminant [of a quartic] is zero if and only if two or more roots are equal. If the coefficients are real numbers and the discriminant is negative, then there are two real roots and two complex conjugate roots. Likewise, if the discriminant is positive, then the roots are either all real or all non-real.

The discriminant of the quartic in question is $-16 (a - 2)^6 (a + 2)^2 (5 a^2 + 12 a + 20)^2 \le 0$. Therefore, that quartic has only real roots iff its discriminant is zero.
Factoring the discriminant is the hard part here, harder than factoring the quartic in the first place.
