Maximum value of $a^2b$ when $a+b=20$ I was asked to solve the following problem:

Let $a$ and $b$ be two positive real numbers with $a+b=20$. Find the maximum possible value of $a^2b$.

I first approached the problem in this way:
Approach 1: From AM-GM inequality we have $$\frac{a+a+b}{3}\geq \sqrt[3]{a^2b}\\ \implies a^2b\leq \left(\frac{2a+b}{3}\right)^3$$
The maximum is achieved when the equality holds, that is when $a=b=10$. Hence, $\max(a^2b)=\left(\frac{30}{3}\right)^3=1000$.
It looked nice to me until I noticed that if $a=11$ and $b=9$, then $a^2b=1089>1000$. Indeed $1000$ is not the maximum and I found that in the following approach:
Approach 2: Since $b=20-a$, let $f(a)=a^2(20-a)$. Now $f'(a)=40a-3a^2$ and $f''(a)=40-6a$. Maximum is achieved when $40a-3a^2=0\implies a=\frac{40}{3}$. Hence $\max(a^2b)=\frac{32000}{27}>1000$.
Now my question is why am I getting a wrong answer in my first approach. I don't find any reason for which that is wrong. Moreover, it is more natural to me to use known inequalities like AM-GM before using a calculus approach.
(I'm pretty sure that this kind of problem has been posted before in MSE. But as I want to know what is wrong in my solution, this is possibly not a duplicate.)
 A: Alternative approach.
Known that the geometric mean is always less than or equal to the the arithmetic mean, for elements of $\Bbb{R^+}$, with equality only achieved when all of the numbers are equal.
You could instead construe the problem as $r + s + b = 20$, where $r = \frac{a}{2} = s$, and you are trying to maximize $(r \times s \times b).$  It turns out that the $r = \frac{a}{2} = s$ constraint becomes redundant based on the observation that equality is only reached when $r,s,b$ are all equal.
Edit
This type of approach works with similar problems, such as maximizing $a^3b^2, ~: a + b = 20, 0 < a,b.$ 
The idea is that you construe the problem as : 
$r + s + t + u + v = 20$, with $r,s,t = \frac{a}{3}, ~~~u,v = \frac{b}{2}$.
Since you are trying (in effect) to maximize the geometric mean of $r,s,t,u,v$, all $5$ of the variables must be equal.  This immediately yields that $a = 12, b = 8.$
A: Maybe looking at the AM-GM solution of your problem gives you the right insight. You need to enforce one side of the inequality to stay at the constant $a+b=20$:
\begin{eqnarray*} 20
& = & a+b \\
& = & \frac a2 + \frac a2 + b \\
& \stackrel{AM-GM}{\geq} & 3\sqrt[3]{\frac{a^2}4 b} 
\end{eqnarray*}
Now, solving for $a^2b$ gives
$$a^2b \leq \frac{32000}{27} \text{ with equality for } \frac a2 = b \stackrel{a+b=20}{\Rightarrow} a = \frac{40}3, b= \frac{20}3$$
A: The issue is that your upper bound derived from AMGM inequality depends on your variables $a,b$. Therefore the equality condition does not actually inform you about the maximal value of $a^2b$.
For example, if $f(a,b)\leq C$ where $C$ is constant and you know the equality condition, then you know the condition for the maximum $C$ to be attained. If instead $f(a,b)\leq g(a,b)$, then the equality condition only tells you when $f(a,b)=g(a,b)$, not when $f(a,b)$ takes a maximum. The crucial thing is that the RHS of the inequality changes too.
A: Because $a+a+b$ is not a fixed number. So the maximum may not be achieved when they are equal.
