How to maximize the expression $xy(1-2x-3y)$ when $\{x>0, y>0, 2x+3y<1\}$ Find the greatest value of the following expression $xy(1-2x-3y)$ when $x>0$,$y>0$,$2x+3y<1$ and also determine in each case the value of the variables for which the greatest value is attained.
I have tried to solve it using AM-GM inequality considering the positive real numbers $xy$,$(1-2x-3y)$. What should I do after that? Or suggest any other way of solving the problem.
 A: We have a one-line solution that can be obtained using the AM - GM inequality :
$$\begin{align}&\left(1-2x-3y\right)+2x+3y\\
&\geq 3\sqrt [3]{6xy(1-2x-3y)}\\
\implies &xy\left(1-2x-3y\right)\leq\frac {1}{162}\thinspace .\end{align}$$
The equality occurs iff, when
$$\begin{align}&2x=3y=1-(2x+3y)\\
\implies &2x=1-4x\\
\implies &\left(x,y\right)=\left (\frac 16, \frac 19\right)\thinspace .\end{align}$$

In this answer, we provide a  alternative method that does not use some specific inequalities and known calculus tools.
Let $0<a=2x+3y<1$ and $y=\frac {a-2x}{3}$, then we have :
$$\begin{align}f(x,y):&=xy(1-2x-3y)\\
&=xy(1-a)\\
&=\frac {a-1}{24}\left(4x-a\right)^2+\frac {a^2-a^3}{24}\end{align}$$
Since $a-1<0$, the maximum occurs at $x=\frac a4,\thinspace y=\frac a6 \thinspace ,$ which makes $4x-a=0\thinspace.$ Thus, we need to find the $\max\{a^2-a^3\mid 0<a<1\}\thinspace.$
Using the method implemented here , we observe that :
$$\begin{align}\frac {4}{27}-\left(a^2-a^3\right)&=\frac {1}{27}(3a+1)(3a-2)^2\geq 0\end{align}$$
Therefore, we obtain :
$$\begin{align}xy(1-2x-3y)&\leq \frac {4}{27\cdot 24}\\
&=\frac {1}{162}\thinspace .\end{align}$$
where $\thinspace x,y>0$ and $2x+3y<1\thinspace .$
Equality holds iff, when $a=\frac 23\thinspace.$ This yields :
$$\begin{align}(x,y)=\left(\frac a4,\thinspace \frac a6\right)=\left (\frac 16, \frac 19\right)\thinspace .\end{align}$$
This completes the answer.
