1
$\begingroup$

We know that $x+y=3$ where x and y are positive real numbers. How can one find the maximum value of $x^2y$? Is it $4,3\sqrt{2}, 9/4$ or $2$?

$\endgroup$
1
  • $\begingroup$ Do you know what AM-GM is? Do you know what calculus is? $\endgroup$
    – Calvin Lin
    Dec 29, 2012 at 13:53

4 Answers 4

4
$\begingroup$

By AM-GM

$$\sqrt[3]{2x^2y} \leq \frac{x+x+2y}{3}=2 $$

with equality if and only if $x=x=2y$.

Second solution

This one is more complicated, and artificial (since I needed to know the max)$.

$$x^2y=3x^2-x^3=-4+3x^2-x^3+4=4- (x-2)^2(x+1)\leq 4$$

since $(x-2)^2(x+1) \geq 0$.

$\endgroup$
1
  • $\begingroup$ I alredy upvoted this answer ! $\endgroup$
    – Amr
    Dec 29, 2012 at 14:22
2
$\begingroup$

Lagrange multipliers: Let $f(x,y)=x^2y$ and $g(x,y,\lambda)=x^2y-\lambda (x+y-3)$. Then: $$\partial _y g=0\iff x^2-\lambda=0\iff x=\pm \sqrt{\lambda}$$ $$\partial _x g=0\iff 2xy-\lambda=0\iff xy=\frac{\lambda}2\iff y=\pm \frac{\sqrt{\lambda}}2$$ $$\partial _{\lambda} g=0\iff x+y=3$$

with $\lambda>0$. We want $x+y=3$ and so $\sqrt{\lambda}=2\iff \lambda=4$ or $-\sqrt{\lambda}=2$ which is impossible. Thus, $$(x,y)=(2,1)$$ and $f(2,1)=4$ is a possible maximum value. To verify that it is the maximum value you will have to determine the eigenvalues of the Hessian (which is simple)

$\endgroup$
1
  • $\begingroup$ @BabakSorouh You are welcome. $\endgroup$
    – Nameless
    Dec 29, 2012 at 15:57
2
$\begingroup$

$x^2y=x^2(3-x)=3x^2-x^3$

So, $\frac{x^2y}{dx}=3(2x)-3(x^2)=3x(2-x)$

For the extreme values of $x^2y,\frac{x^2y}{dx}=0\implies x=0$ or $x=2$

Now, $\frac{d^2(x^2y)}{dx^2}=6-3(2x)=6(1-x)$

At $x=0,\frac{d^2(x^2y)}{dx^2}=6>0$ so $x^2y$ will have minimum value at $x=0$

At $x=2,\frac{d^2(x^2y)}{dx^2}=-6<0\implies x=2$ will make $x^2y$ the maximum

$\endgroup$
5
  • $\begingroup$ Is there a solution that does not use calculus ? $\endgroup$
    – Amr
    Dec 29, 2012 at 14:03
  • $\begingroup$ @Amr, find in N.S.'s answer $\endgroup$ Dec 29, 2012 at 14:20
  • $\begingroup$ @lab, although it didn't matter in this case, shouldn't you have also checked the edge cases as well? You already have $x=0$ as a minimum but $y=0, x=3$ should have been explicitly checked since the variables were constrained to be positive. $\endgroup$ Dec 29, 2012 at 14:24
  • $\begingroup$ @half-integerfan, $x=3$ does not purvey any extreme value of $x^2y$, at least by Calculus. $\endgroup$ Dec 29, 2012 at 14:27
  • $\begingroup$ @lab, if the constraint had been $x \gt -10$ instead of $x \gt 0$ then the maximum value would be at $x = -10$ even though it does not have slope zero, because the function continues to $+ \infty$ as $x$ goes to $- \infty$. $\endgroup$ Dec 29, 2012 at 14:33
1
$\begingroup$

Besides' to @lab's answer, the following fact may help you:

If $x$ and $y$ be positive numbers such that $ax+by=k$, $k$ is constant, then $x^{\alpha}y^{\beta}$ has maximum value if $\frac{ax}{\alpha}=\frac{by}{\beta}=\frac{k}{\alpha+\beta}$.

Now find the value.

$\endgroup$
1
  • 1
    $\begingroup$ Dear Babak, your solution is elegant and simple. But the fact you are using is probably not to the OP's knowledge. Not that my answer is (as it seems), but I think Lagrange multipliers are more well known than this fact. The AM-GM answer is probably the most elementary out of all these answers. $\endgroup$
    – Nameless
    Dec 29, 2012 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .