$$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?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this community$$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?
.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)|$.
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$.
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}$$
Alternative solution : you can note that
$$ P(x)=2x^2+((x-2)^2)(x^2+6) $$
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.
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$.
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}
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.$$
$$x^{4} - 4 x^{3} + 12 x^{2} - 24 x + 24 = \begin{bmatrix} x^2 \\ x \\ 1 \end{bmatrix}^\top \begin{bmatrix} 1 && -2 && t \\ -2 && 12 - 2t && -12 \\ t && -12 && 24 \end{bmatrix} \begin{bmatrix} x^2 \\ x \\ 1 \end{bmatrix}$$
where $t \in \mathbb R$. Using Sylvester's criterion, after some work, we learn that the (symmetric) matrix above is positive semidefinite when
$$t \in \left[ 2 - 4 \cos{\left(\frac{\pi}{9} \right)}, 2 + 4 \sin{\left(\frac{\pi}{18} \right)} \right]$$
Computing the Cholesky decomposition of the matrix for an admissible value of $t$, we obtain a sum of squares (SOS) decomposition, thereby proving that the given quartic polynomial is (globally) nonnegative.
$\boxed{t = 1}$
$$\begin{bmatrix} 1 && -2 && 1 \\ -2 && 10 && -12 \\ 1 && -12 && 24 \end{bmatrix} = {\rm L} {\rm L}^\top$$
where
$${\rm L} = \begin{bmatrix} \color{blue}{1} & 0 & 0\\ \color{blue}{-2} & \color{magenta}{\sqrt{6}} & 0\\ \color{blue}{1} & \color{magenta}{- \frac{5 \sqrt{6}}{3}} & \color{red}{\frac{\sqrt{57}}{3}} \end{bmatrix}$$
and, thus,
$$\begin{aligned} x^{4} - 4 x^{3} + 12 x^{2} - 24 x + 24 &= \left( \color{blue}{x^2 - 2 x + 1} \right)^2 + \left( \color{magenta}{\sqrt{6}\, x - \frac{5 \sqrt{6}}{3}} \right)^2 + \left( \color{red}{\frac{\sqrt{57}}{3}} \right)^2 \\ &= \left( x - 1\right)^4 + 6 \left( x - \frac{5}{3} \right)^2 + \frac{19}{3}\end{aligned}$$
which is the same sum of squares (SOS) decomposition in this answer.
$\boxed{t = 0}$
$$\begin{bmatrix} 1 && -2 && 0 \\ -2 && 12 && -12 \\ 0 && -12 && 24 \end{bmatrix} = {\rm L} {\rm L}^\top$$
where
$${\rm L} = \begin{bmatrix} \color{blue}{1} & 0 & 0\\ \color{blue}{-2} & \color{magenta}{2 \sqrt{2}} & 0\\ 0 & \color{magenta}{- 3 \sqrt{2}} & \color{red}{\sqrt{6}} \end{bmatrix}$$
and, thus,
$$\begin{aligned} x^{4} - 4 x^{3} + 12 x^{2} - 24 x + 24 &= \left( \color{blue}{x^2 - 2 x} \right)^2 + \left( \color{magenta}{2 \sqrt{2} \, x - 3 \sqrt{2} } \right)^2 + \left( \color{red}{\sqrt{6}} \right)^2 \\ &= x^2 \left( x - 2\right)^2 + 2 \left( 2 x - 3 \right)^2 + 6\end{aligned}$$
$\boxed{t = 2}$
$$\begin{bmatrix} 1 && -2 && 2 \\ -2 && 8 && -12 \\ 2 && -12 && 24 \end{bmatrix} = {\rm L} {\rm L}^\top$$
where
$${\rm L} = \begin{bmatrix} \color{blue}{1} & 0 & 0\\ \color{blue}{-2} & \color{magenta}{2} & 0\\ \color{blue}{2} & \color{magenta}{-4} & \color{red}{2}\end{bmatrix}$$
and, thus,
$$\begin{aligned} x^{4} - 4 x^{3} + 12 x^{2} - 24 x + 24 &= \left( \color{blue}{x^2 - 2 x + 2} \right)^2 + \left( \color{magenta}{2 x - 4} \right)^2 + \color{red}{2}^2 \end{aligned}$$
>>> from sympy import *
>>> t = symbols('t', real=True)
>>> Q = Matrix( [[ 1, -2, t],
[ -2, 12 - 2*t, -12],
[ t, -12, 24]] )
For $t=1$,
>>> L = Q.subs(t,1).cholesky()
>>> L
Matrix([
[ 1, 0, 0],
[-2, sqrt(6), 0],
[ 1, -5*sqrt(6)/3, sqrt(57)/3]])
For $t=0$,
>>> L = Q.subs(t,0).cholesky()
>>> L
Matrix([
[ 1, 0, 0],
[-2, 2*sqrt(2), 0],
[ 0, -3*sqrt(2), sqrt(6)]])
For $t = 2 - 4 \cos{\left(\frac{\pi}{9} \right)}$,
>>> L = simplify(Q.subs(t,2 - 4 * cos(pi/9)).cholesky())
>>> L
Matrix([
[ 1, 0, 0],
[ -2, 2*sqrt(1 + 2*cos(pi/9)), 0],
[2 - 4*cos(pi/9), -(4*cos(pi/9) + 4)/sqrt(1 + 2*cos(pi/9)), 0]])
For $t = 2 + 4 \sin{\left(\frac{\pi}{18} \right)}$,
>>> L = simplify(Q.subs(t,2 + 4 * sin(pi/18)).cholesky())
>>> L
Matrix([
[ 1, 0, 0],
[ -2, 2*sqrt(1 - 2*sin(pi/18)), 0],
[4*sin(pi/18) + 2, 4*(-1 + sin(pi/18))/sqrt(1 - 2*sin(pi/18)), 0]])
Note that the latter two $\rm L$ matrices are rank-$2$. Thus, the corresponding SOS decompositions are the sums of just $2$ squares.
For general $t$,
>>> L = simplify(Q.cholesky())
>>> L
Matrix([
[ 1, 0, 0],
[-2, sqrt(8 - 2*t), 0],
[ t, sqrt(2)*(t - 6)/sqrt(4 - t), sqrt(-t**2 + 24 - 2*(t - 6)**2*conjugate(1/sqrt(4 - t))/sqrt(4 - t))]])
which suggests that the case $t = 2$ is interesting. Is it?
>>> L = Q.subs(t,2).cholesky()
>>> L
Matrix([
[ 1, 0, 0],
[-2, 2, 0],
[ 2, -4, 2]])
Interesting, indeed.
polynomials sum-of-squares-method matrices matrix-decomposition cholesky-decomposition
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.
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.