Example:
Let $x,$ $y,$ and $z$ be real numbers such that $x^2 + y^2 + z^2 = 1.$ Find the maximum value of $x + 2y + 2z^2.$
We can try using Cauchy: $$(x^2 + y^2 + z^2)(1 + 4 + 4z^2) = 5 + 4z^2 \ge (x + 2y + 2z^2)^2.$$ Equality occurs when there exists $t$ such that $x = 1t, y = 2t, z = 2zt$, simplifying we have that $y = 2x$ and $z(1 - 2t) = 0$, which implies that $z = 0$ or $t = 1/2$. If $t = 1/2$, then $x = 1/2, y = 1$, so $1 + 1/4 + z^2 = 1$ does not produce real solutions. Therefore, $z = 0$. In that case, we have that $x^2 + 4x^2 + 0 = 1 = 5x^2$ and so $x = \pm \frac{\sqrt{5}}{5}$ and $y = \pm \frac{2\sqrt{5}}{5}.$ We can confirm: $\left(\pm \frac{\sqrt{5}}{5} \right)^2 + \left( \pm \frac{2\sqrt{5}}{5} \right)^2 + 0^2 = \frac{5}{25} + \frac{4\cdot5}{25} = \frac{1 + 4}{5} = 1$. Then clearly for $x + 2y + 2z^2$ to be maximized, we must use the positive values for $x,y$, and we find that $x + 2y + 2z^2 = \frac{5\sqrt{5}}{5} = \sqrt{5} \approx 2.236$.
By doing this, we do achieve equality in Cauchy-Schwarz, so we should believe it is a maximum. But indeed, it is not. Note that $$(x^2 + y^2)(1 + 4) \ge (x + 2y)^2$$ gives us that $y = 2x$ and so $x + 2y = 5x$. Then $x + 2y + 2z^2 = 5x + 2 - 10x^2 = -10\left( x - \frac{1}{4} \right)^2 + \frac{21}{8}$. Indeed, when $x = \frac{1}{4}$, we have that $y = \frac{1}{2}$ which implies that $z = \pm\frac{\sqrt{11}}{4}$. Note that $\frac{21}{8} = 2.625 > 2.236 \approx \sqrt{5}$.
My question is: How do I know that the first value that I found isn't the actual maximum of the expression that I am trying to maximize? In fact, what is the first value, anyway? That is, what does it represent? I was under the impression that Cauchy, when we have equality, will give the maximum.