Given $P(x)=x^{4}-4x^{3}+12x^{2}-24x+24,$ then $P(x)=|P(x)|$ for all real $x$ $$P(x)=x^{4}-4x^{3}+12x^{2}-24x+24$$
I'd like to prove that $P(x)=|P(x)|$. I don't know where to begin. What would be the first step?
 A: By completing the square for $x^4+12x^2\cdots$,
$$P(x)=(x^2+6)^2-4x^3-24x-12=(x^2+6)^2-4x(x^2+6)-12\\
=(x^2+6)(x^2-4x+6)-12.$$
The minimum value of the first factor is $6$ and that of the second is $2$.

Or completing the square for $x^2(x^2-4x\cdots)$,
$$P(x)=x^2(x-2)^2+8x^2-24x+24=x^2(x-2)^2+8(x^2-3x+3).$$
As you can easily check, the trinomial on the right has no real root.

Or completing the fourth power for $x^4-4x^3\cdots$,
$$P(x)=(x-1)^4+P(x)-(x^4-4x^3+6x^2-4x+1)\\=(x-1)^4+6x^2-20x+23$$ and the trinomial on the right has no real root.
A: The following builds on @TomZych's neat (and easy to verify) observation posted in a comment:

I observe that $P(x)=x^4 − P'(x)$

$P(x)$ cannot have negative roots by the Descartes' rule of signs.
$P(0)=24 \gt 0$ so any positive roots must be strictly positive.
Let $x_0 \gt 0$ be the smallest strictly positive root so that $P(x_0)=0$. The quoted identity $P(x)=x^4 − P'(x)$ implies $P'(x_0)=x_0^4 \gt 0$.
But $P(x) \gt 0$ on $[0,x_0)$ so $P(x)$ must cross the $x$ axis "from above" at $x_0$ thus it cannot be increasing at $x_0$.   ( More formally, $P'(x_0) > 0$ implies that there would exist an interval $(x_0-\delta,x_0)$ where $P(x) \lt 0$, which in turn would imply a root in $(0,x_0-\delta)$, which would contradict the assumption that $x_0$ is the smallest positive root. )
Therefore $P(x)$ has no real roots, neither negative, nor positive, so $P(x) \gt 0$ since $P(0) \gt 0$.
A: .In this question, you have to attempt to complete two squares, namely:
$$
x^4-4x^3 + 12x^2-24x+24 = x^4 -4x^3+6x^2-4x+1 + 6x^2-20x+23 
\\  = (x-1)^4 + 6x^2 -20x+23
$$
Now, as it turns out, we can complete the second square, and: 
$$
6x^2-20x+23 = \frac{2}{3}(3x-5)^2 + \frac{19}{3} 
$$
Hence, we can rewrite the whole expression as:
$$
x^4-4x^3 + 12x^2-24x+24 = (x-1)^4 + \frac{2}{3}(3x-5)^2 + \frac{19}{3}
$$
It is a sum of positive expressions, hence is always positive, hence $P(x) = |P(x)|$.
A: Just for fun, observe that
$$ P(x) = \begin{bmatrix} x^2 \\ x \\ 1 \end{bmatrix}^\intercal
\begin{bmatrix} 1 && -2 && 0 \\ -2 && 12 && -12 \\ 0 && -12 && 24 \end{bmatrix}
\begin{bmatrix} x^2 \\ x \\ 1 \end{bmatrix}
= 24 - 24x + 12x^2 - 4x^3 + x^4
$$
and since the matrix in the middle is positive semi-definite (This can be determined from determinants of sub-matrices, etc.), it follows immediately $P(x) \geq 0$.
A: Here is an alternative solution. You can see that $P(x)$ is positive iff $P(x+c)$ is positive for all $x$ (think about why). So you can slightly simplify the polynomial by such substitution, for example
$$P(x+1) = x^4+6 x^2-8x+9$$
Now it's easy since you can check that $6x^2-8x+9$ corresponds to parabola with positive global minimum, hence all its values are positive. Since also $x^4$ is non-negative, you can combine it to see the whole polynomial is positive.
If you want to be a bit more explicit, you can rewrite the parabola on the right to get
$$P(x+1) = x^4 + 6\left(x-\frac{2}{3}\right)^2+\frac{19}{3}$$
A: Alternative solution : you can note that
$$
P(x)=2x^2+((x-2)^2)(x^2+6)
$$
A: As the other answers pointed out, you need to prove that the polynomial is positive for all values of $x$. A very common way to do it is to express it as a sum of squares.
$$P(x)=x^4−4x^3+12x^2−24^x+24$$
The problems here are the two terms where X is at an odd power: $-4x^3$ and $-24x$
Trying to fit them into squares is almost automatic:
\begin{align}
P(x) & = x^4−4x^3+12x^2−24x+24 \\
     & = (x^4 - 4x^3 + 4x^2) + 8X^2 - 24X + 24 \\
     & = x^2(x-2)^2 + 6(x^2 - 4X + 4) + 2x^2 \\
     & = x^2(x-2)^2 + 6(x-2)^2 + 2x^2
\end{align}
A: If  a real polynomial $P$ has a lower bound then $$\min P(x)=\min \{P(x): P'(x)=0\}.$$ A polynomial of even degree and positive leading co-efficient has a lower bound.  In this case we have $P'(x)=4x^3-12x^2+24x-24$. Now  $$P''(x)=12(x^2-x+ 2)=12((x-1)^2+ 1)>0.$$     So $P'(x)$ is strictly increasing , with a  unique real $x_0$ such that $P'(x_0)=0.$  So $\min P(x)=P(x_0).$ 
Using "synthetic division" , divide $P'(x)$ into $P(x)$: We have $P(x)=P'(x)(x-1)/4 +3(x^2-2x+2).$ So $$\min P(x)=P(x_0)=3(x_0^2-2x_0+2)=3((x_0-1)^2+1)>0.$$
A: It's worth noting that there is another way to compare $P(x)$ to $Q(x) = (x-1)^4 = x^2-4x^3$ $+ \ 6x^2-4x+1$. $P(x) - Q(x)$ is thus $(12 - 6)x^2 + (-24 -- 4)x+ 24 - 1 = 6x^2 -$ $\ 20x + 23$ which has discriminant $400 - 4 \cdot 6 \cdot 23 < 0$, hence $P(x) > Q(x)$ for all values of $x$.
Now $Q(x) > 0$ for all real $x$ except $x = 1$. However, $P(1)  = 1 - 4 + 12 - 24 + 24 > 0$. Thus $P(x) > 0$ for all real $x$ and thus the conclusion follows.
A: The first step is definitely recalling a modulus function's definition:
$$|x| := \begin{cases}x & \text{if } x\ge 0 \\ -x & \text{if } x\le 0\end{cases}$$
So the requirement $P(x) = |P(x)|$ is equivalent to $P(x) \ge 0$.
Hope you can continue from that.
