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

 A: It may be useful to describe the problem as follows:
Maximize objective function $f(x,y) = xy$ subject to constraint $x + 5y = 20$. Because the constraint is an equality, we may solve through simple substitution.
$x + 5y = 20 \Rightarrow x(y) = 20 -5y$
Allows us to evaluate the unconstrained maximization problem:
$\max f( \mathrm{argmax}\,f(x,y)) = 20y - 5y^2$.
$\mathrm{argmax}\, f(x,y) = (x,y)$ such that $\frac{\partial f}{\partial y} = 20 -10y^* = 0$. By inspection, we find that $y^* =2$ and so $\mathrm{argmax}\, f(x,y) = \big(x(y^*),y^*\big) = (10,2)$
Finally, evaluating f at $(10,2)$, we see that $A = 20$.
A: 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.
A: There is a theorem that the product of two numbers is greatest when they are equal, which can be proved in an elementary way using the identity $$4ab=(a+b)^2-(a-b)^2$$ when you clearly need $(a-b)^2$ to be as small as possible.
You can use this here by setting $z=5y$ so that $5A=xz$ and $x+z=20$: then $x=z=5y$ to give the maximum value of $5A$ and hence of $A$.
To do the same thing in a simple way with calculus, let $A=xy$ and $x+y=B$ be fixed. Then $y=B-x$ and $A=x(B-x)=Bx-x^2$.
Then $\frac {dA}{dx}=B-2x$ and the turning point is at $x=\frac B2$ (which agrees with the previous calculation).
You can do the calculus bit directly in your question by setting $x=20-5y$ and computing everything in terms of $y$. But I did want to show you some of the tricks you can use, because they are sometimes easier, and occasionally give a helpful check on a result obtained by other means.
