Finding the maximum of a function with two variables I started with $f(x,y)=20x-x^2+30y-y^2+xy$.
I need to find the maximum values for both $x$ and $y$. 
I have differentiated it using implicit differentiation and have gotten to an answer of:
$$y'=\frac{2x-20-y}{30-2y+x}.$$
I know that I need to set this equation equal to zero, but I don't know how to get to numerical values for $x$ and $y$. Any help would be appreciated!
 A: Look for the critical points of $f(x,y)=20x-x^2+30y-y^2+xy$:
\begin{align}
f_x(x,y)&=20-2x+y&f_y(x,y)&=30-2y+x
\end{align}
The critical points $(x,y)$ of $f$ occurs when
\begin{align}
20-2x+y&=0\\
30-2y+x&=0\\
\end{align}
So
\begin{align}
2x-y&=20\\
x-2y&=-30\\
\end{align}
Then
$$x=\frac{70}{3}\quad\text{ and }\quad y=\frac{80}{3}$$
Next, evaluate the discriminant of $f$ at $(70/3,80/3)$:
$$\Delta =f_{xx}(x,y)f_{yy}(x,y)-f_{xy}(x,y)^2$$ 
If $\Delta >0$ then in the critical point the function reaches a minimum. If $\Delta <0$ then in the critical point the function reaches a maximum. 
In order to be sure that the critical point is not a saddle point verify $f_{xx}(x,y)$ and $f_{yy}(x,y)$ do not vanish at $(70/3,80/3)$.
A: Without Using Derivatives.
Let $$f(x,y)=-x^2-y^2+xy+20x+30y\;,$$ Now Put $x=u+v\;,y=u-v$
So $$f(u,v) = -(u+v)^2-(u-v)^2+(u+v)\cdot (u-v)+20(u+v)+30(u-v).$$
So $$\displaystyle f(u,v) = -u^2-3v^2+50u-10v$$
$$\displaystyle f(u,v) = -\left[u^2-50u+(25)^2-(25)^2\right]-3\left[v^2+\frac{10v}{3}+\frac{25}{9}-\frac{25}{9}\right]$$
So $$\displaystyle f(u,v) = -(u-25)^2-3\left(v+\frac{5}{3}\right)^2+625+\frac{25}{3}\leq 625+\frac{25}{3}$$
and equality hold when $$\displaystyle(u-25)=0\Rightarrow  u=25$$ and $$\displaystyle \left(v+\frac{5}{3}\right)=0\Rightarrow v=-\frac{5}{3}$$
So $\displaystyle x=u+v=25-\frac{5}{3}=\frac{70}{3}$ and $\displaystyle x=u+v=25+\frac{5}{3}=\frac{80}{3}$
