The quadratic polynomial $P(x),$ with real coefficients, satisfies
\[P(x^3 + x) \ge P(x^2 + 1)\]for all real numbers $x.$  Find the sum of the roots of $P(x).$
What's a quadratic polynomial? It's a polynomial of degree 2, so it looks like $ax^2 + bx + c$. So $P(x) = ax^2 + bx + c$. Right. Now we need to figure out what $P(x^3 + x)$ and $P(x^2 + 1)$ are. Well $P(x^3 + x) = a(x^3 + x)^2 + b(x^3 + x) + c$. And that simplifies to $ax^6 + 2ax^4 + ax^2 + bx^3 + bx + c$. Ok and $P(x^2 + 1) = a(x^2 + 1)^2 + b(x^2 + 1) + c$. Which simplifies to $ax^4 + 2ax^2 + a + bx^2 + b + c$. Now we just need to find the sum of the roots of $P(x)$. That would be $-\frac{b}{a}$. Ok, so let's go back to the inequality. It says that $P(x^3 + x) \ge P(x^2 + 1)$. So $ax^6 + 2ax^4 + ax^2 + bx^3 + bx + c \ge ax^4 + 2ax^2 + a + bx^2 + b + c$. That's correct. Ok, and since $P(0) = c$ and $P(1) = a + b + c$, we get $c = a + b + c$. And that means $a + b = 0$. So $a$ and $b$ have opposite signs. Right. Since $a$ and $b$ have opposite signs, the sum of the roots of $P(x)$, which is $-\frac{b}{a}$, is positive. If $a$ is positive, then $P(x^3 + x)$ is a polynomial with all positive coefficients. Ok, so the inequality is $P(u) \geq P(w)$. But $u - w = x^3 + x - x^2 - 1 = x^3 - x^2 + x - 1$ We factor out $a$ to get $a(u^2-w^2) + b(u-w) \geq 0$ We plug in the expressions for $u$ and $w$ to get $(x^3+x-x^2-1)(a(x^3+x+x^2+1)+b) \geq 0$ Notice that $x^2+1$ is never zero so we can divide by it. But the inequality is true for all $x$ so the expression in the parenthesis must have the same sign as $(x-1)$ If $x > 1$, then $x-1$ is positive so $(a(x+1)(x^2+1)+b)$ must be positive. If $x < 1$, then $x-1$ is negative so $(a(x+1)(x^2+1)+b)$ must be negative. Then $(x-1)$ is zero so $(a(x+1)(x^2+1)+b)$ can be either positive or negative. So we have three cases:
1. $a(x+1)(x^2+1)+b$ is positive for all $x$.
2. $a(x+1)(x^2+1)+b$ is negative for all $x$.
3. $a(x+1)(x^2+1)+b$ is zero for all $x$. That's true. So by the intermediate value theorem, if the polynomial is not zero for all $x$, then it must be zero for some $x$. But if it's zero for some $x$, then it has a root. That's correct. So $a(1+1)(1^2+1)+b = 0$ Which simplifies to $4a + b = 0$ We can use this equation to solve for $b$ in terms of $a$. So $b = -4a$ So the sum of the roots is $-\frac{b}{a} = -\frac{-4a}{a} = 4$

