Question
For $x> 0$, maximize $f(x)=(1+x)(1+x)(1-x)$.
My solution Using AM-GM for two variables, $a$ and $b$, $a = (1+x)^4$ and $b = (1-x)^2$, we get f(x) is maximum when $a=b$.
But when I solve for $x$ by equating $a=b$, it has a negative root and 2 complex roots.
The correct answer is $1.185$.
Where is my solution wrong? How can we solve this using two variables by AM-GM inequality?
Thank you.
$$2f(x) = (1+x)(1+x)(2-2x)\leq \Big({1+x+1+x+2-2x\over 3}\Big)^3 = \Big({4\over 3}\Big)^3$$
Equality is iff $1+x=2-2x$, i.e. $x=1/3$ and $y_{\max} = {32\over 27}$