Finding maximum points by constrain optimization (multivariable calculus) Find the maximum value of the function $f(x,y)=x^2+y^2+2x+y$, on the closed disc (the circle together with the region inside the circle) of radius 2, centred at the origin.
What i tried
I know that i have to maximize the function
$f(x,y)=x^2+y^2+2x+y$
with a constrain of 
$x^2+y^2<2$
which then give me a new function of 
$L(x,y,\lambda)=x^2+y^2+2x+y+\lambda(x^2+y^2-2)=0$ which i have to maximize.
Then finding critical points and equating to 0, it leads me to the system of equations 
$$ 2x +2+ (2\lambda)x = 0 $$
$$ 2y +1+ (2\lambda)y = 0 $$
$$x^2+y^2=2$$
I got stuck at solving these equations and im unsure that after geeting the crticial points. Do have to substitute the critical points back to the original equation $f(x,y)$ or the equation $L(x,y,\lambda)$ to get the maximum value. Could anyone help. Thanks
 A: You can rewrite the equation you have as follows $$\begin{cases}2x(1+λ)=-2\\2y(1+λ)=-1\\y^2=2-x^2\end{cases}$$ or equivalently (in order to avoid calculations with roots) as $$\begin{cases}4x^2(1+λ)^2=4\\4y^2(1+λ)^2=1\\y^2=2-x^2\end{cases}$$ Now subsituting the 3rd equation into the 2nd yields $$1=4(2-x^2)(1+λ)^2=8(1+λ)^2-4x^2(1+λ)^2=8(1+λ)^2-4$$ where the last equality is due to the first equation. Hence $$8(1+λ)^2=5 \quad  \implies \quad λ=-1\pm\sqrt{\dfrac{5}{8}}$$ which leads you with straightforward calculations to the solution.
A: Hint:  The function is convex in both variables, so the maximum is on the boundary $x^2+y^2=4$. Now you can parametrise, or use $(x^2+y^2)(4+1)\ge(2x+y)^2$ by the Cauchy-Schwarz inequality to find the maximum. 
PS: the max should be $4+2\sqrt5$ after simplifications. 
A: For this problem, there's a cheap trick: 
$$
f(x, y) = x^2 + y^2 + 2x + y = (x+1)^2 + (y+\frac{1}{2})^2 - \frac{5}{4}
$$
The gradient of this is zero for $x = -1, y = -1/2$; unfortunately that's the location of the global min rather than a max. 
So now you know that the max occurs on the boundary. 
The boundary can be parameterized by $s(t) = \sqrt{2}(\cos t, \sin t)$, thus converting the problem to a 1D optimization, which I'm sure you can do. 
