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.
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.$
Here is the reason:
First, the maximum is achieved when $a = \frac{3}{2}, b = \frac{3}{4}$. you can check this would give the result you stated, and to get the answer you can use techniques like $Lagrange$ multiplier.
Then you can see that when $a = \frac{3}{2}, b = \frac{3}{4}$, we have that $\frac{a+b}{2} = \frac{9}{8}$, which is larger than $\frac{1}{2}$ (which is what you would get if $a=b=1$). So the inequality $\sqrt ab \leq \frac{a+b}{2}$ only tells you the LHS is less than or equal to RHS, but it does not imply that when LHS = RHS, you would get LHS as the maximum, because your RHS is changing.