maximise area under constraints $$\max f(x,y) = xy$$
subject to
$$x^{2} + y^{2} \leq 1$$
so what i did was convert it to a minimisation probelm and rewrote the constraints
so i get
$$\min f(x,y) = -xy $$
subject to $$1-x^2-y^2 \geq 0$$
from here i got the lagrangian to be $$L = -xy -\lambda_{1}(1-x^{2}-y^{2})$$
which results in $$\nabla L = \begin{bmatrix} -y + 2 \lambda_{1}x \\ -x + 2 \lambda_{1}y \end{bmatrix}$$
when i set this to zero and try solve for x,y in terms of lambda i get x=y=0. but when i plot the function i see zero is not the optimal solution, i am not sure how to proceed from here could someone assist please
 A: *

*We have $\nabla f = \begin{bmatrix} y \\ x \end{bmatrix}$ and for constraint $\nabla g = \begin{bmatrix} 2x \\ 2y \end{bmatrix}$.

*At a critical point, by Lagrange multiplier, we need to have $\nabla f = \lambda \nabla g$, for some $\lambda$, which along with the level curve of the constraint function $g(x,y)=x^2+y^2$ (at height $1$) gives us the following system of equations:

$\quad\quad y=2\lambda x$
$\quad\quad x=2\lambda y$
$\quad\quad x^2+y^2=1$,

*

*Solving the above (eliminate $\lambda$ from the first two equations first) we obtain $x^2=y^2=\frac{1}{2}$. Note that the 3rd equation ensures that we can't have $x=y=0$, also as shown from the gradient field of $f$, you can see $(0,0)$ is a saddle point and the maximum does not occur inside the constraint region, but at the boundary.


The following figure shows the contours of $f$ and $g$.


*

*From above we can see that the maximum occurs at the points $\left(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right)$ and $\left(-\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}}\right)$, with $f_{max}=\frac{1}{2}$.

A: An alternative solution.
$x^{2} + y^{2} \leq 1$ is a unit disc.
Set $x=r\cos{\varphi}, y=r\sin{\varphi}.$ The expression to maximize becomes
$$\frac{r^2}{2}\sin{2\varphi},$$ which is clearly maximal for $r=1$ and $\varphi =\frac{\pi}{4}.$
Therefore $$f(x,y)\leq f\left(\frac{\sqrt2}{2}, \frac{\sqrt 2}{2}\right)=\frac{1}{2}.$$
A: 
when i set this to zero and try solve for x,y in terms of lambda i get x=y=0.

This is where you got it wrong. Sandipan Dey already show how to fix it. Here I'm just providing another simple solution for the record.
We have $$2xy = x^2+y^2 - (x-y)^2 \le x^2+y^2 \le 1,$$
where equality occurs when $x=y=\pm\frac{1}{\sqrt{2}}$.
