<s>[INST] Flaw in my reasoning for the maximum of $ab$ if $a,b\ge0$ and $a+2b=3$? Problem statement: What is the maximum value of the product $ab$ if $a$,$b$ are non-negative numbers such that $a+2b=3$?
What is the flaw in my solution?
We know that $\sqrt{ab} ≤ \frac{ (a+b)}{2}$ and that $a=3-2b$. The product $ab$ will be maximum when it is equal to the square of the RHS of the inequality above. Plugging in for $a$, and squaring both sides we get the equation: $(3-2b)(b)=\frac{(((3-2b)+b)^2}{4}$. Which gives $b=1$. And plugging $b=1$ into the the equation in the problem statement gives $a=1$. So, the max product is $1*1=1$.
What am I doing wrong? What concepts could I be I misunderstanding? Can you please explain? The actual answer is $9/8$. Thank you.
 [/INST] Building upon OP's attempt to use AM-GM, the following will work, instead, because it is arranged such that the right-hand side of the inequality matches the known constant sum.
$$
\sqrt{a \cdot 2b} \le \frac{a + 2b}{2}=\frac{3}{2} \;\implies\; 2ab \le \left(\frac{3}{2}\right)^2 = \frac{9}{4} \;\implies\; ab \le \frac{9}{8}
$$
The maximum value of $\frac{9}{8}$ is attained when $a = 2b$, which is $a=\frac{3}{2}, b=\frac{3}{4}$.
</s>