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.
 A: Indeed: We have $$(3-2b)b \le\frac{(3-b)^2}{4}$$ is a true statement and in fact equality holds when $b=1$.
However, it is possibel for the LHS to get a larger value and the equality doesn't hold.
To maximize it notice that $(3-2b)b$ is a concave quadratic and the optimal value is attained when $$b = \frac{1.5}{2}=\frac34$$
That is the maximum value is $\left( \frac32\right) \cdot \left( \frac34\right)=\frac98.$

A: 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}$.
A: I know you have accepted the answer but still I have one analogy to share with you-
Suppose we have a quadratic equation(to say) as -
$e^xx^2-(logx)x+3=0$
Now you found it's roots by using quadratic formula. The "expression" of roots that you will obtain will also be some function of $x$ and in that case you can't call those expressions as roots because roots are the values of variable for which the equation reduces to zero and you can't get values of variable in terms of variable because a value is fixed. If the equation would be as follows-
$x^2-3x+2=0$ then the you will obtain a constant value and in that case you can say that those values are certainly the roots of your equation.
Similarly ,as @dxiv mentioned in his answer and comments, "unless you claim it is a constant relative to constraints, you can't claim it a maximum".
