How to Differentiate two equations to find Maximum Values I am stuck on this Differentiation problem, any help would be great!

If $A=xy$ and $x+5y=20$ find the maximum value of $A$ and the values of $x$ and $y$ for which this maximum value occurs


Another way to handle constrained problems is the "Lagrange multiplier method.  Write the function to be, in this case, maximized as $f(x,y)= xy$ and write the constraint as $g(x,y)= x+ 5y- 20$.  Then $\nabla f= y\vec{i}+ x\vec{j}$ and $\nabla g= \vec{i}+ 5\vec{j}$.  An extreme point, either maximum or minimum, of f with constraint g= 0, occurs only when $\nabla f= \lambda \nabla g$ where $\lambda$, the "Lagrange multiplier", is a constant.  That is, we must have $y\vec{i}+ x\vec{j}= \lambda \vec{i}$ so $y= \lambda$ and $x= 5\lambda$.  We also have the constraint x+ 5y= 20- three equations to solve for x, y, and $\lambda$.  We have $x+ 5y= 5\lambda+ 5\lambda= 10\lambda= 20$ so $\lambda= 2$ and then x= 10 and y= 2 for a maximum value of A equal to 20.
In this simple case, the simplest thing to do is what nicomezi suggested.  Though I would solve the constraint for x= 20- 5y, rather than for y, and write the function to be maximized as $xy= (20- 5y)y= 20y- 5y^2$.  Now either take the derivative with respect to y and set it equal to 0: 20- 10y= 0 so y= 20/10= 2 and then x= 20- 5(2)= 10 or "complete the square".  $20y- 5y^2= -5(y^2- 4y+ 4- 4)= -5(y- 2)^2+ 20$.  That is a parabola opening downward.  It is "20 minus something" so is maximum, 20, when that "something", $5(y-2)^2$, is 0, at y= 2.
There you have three different methods, of different "sophistication" and different ease of calculation.
