Given that $x^2 + y^2 = 2x - 2y + 2$ , find the maximum value of $x^2 + y^2 + \sqrt{32}$ . 
Given that $x^2 + y^2 = 2x - 2y + 2$ , find the maximum value of $x^2 + y^2 + \sqrt{32}$ .


What I Tried :- Since $x^2 + y^2 = 2x - 2y + 2$ , we have $2x - 2y + 2 + \sqrt{32}$
=> $2(x - y + 1 + 2√2)$ . From this step I am not sure how to move forward .
Also I tried to express $x^2 + y^2 + \sqrt{32} \leq S$ , so that in that way we can say that $x^2 + y^2 + \sqrt{32}$ is maximum at $S$ , but I couldn't do it .
Can anyone help me ? Some hints or suggestions to this problem will be appreciated !!
 A: Hint: $x^2+y^2=2x-2y+2$ is equivalent to $(x-1)^2+(y+1)^2=4$, which is the equation of a circle with the centre in $C=(1,-1)$ and radius $2$. To maximise $x^2+y^2+\sqrt{32}$ it is enough to first maximise $\sqrt{x^2+y^2}$, i.e. the distance from the origin $O=(0,0)$.
Now, which point in that circle is the farthest from the origin? It will be the intersection of half-line $[OC)$ with the circle, i.e. the point $(x,y)=(1+\sqrt{2},-1-\sqrt{2})$, giving you the maximum value $x^2+y^2+\sqrt{32}=6+8\sqrt{2}$.
A: The given expression can be written as $\ (x-1)^2+(y+1)^2=2^2$
$\ x-1=2cos\theta$, $\ y+1=2sin\theta$
$\ x^2+y^2+4\sqrt2=(2cos\theta +1)^2+(2sin\theta-1)^2+4\sqrt2$
$\ =6+4\sqrt2+4(cos\theta-sin\theta)$
Therefore maximum value$\ =6+8\sqrt2$
A: Using the Lagrange multiplier method, we make the expression $F(x,y,\lambda)=x^2+y^2+\sqrt{32}+\lambda(x^2+y^2-2x+2y-2)$ and then calculate partial derivatives on $x$, $y$ and $\lambda$, require them to be $0$, then solve for $x$ and $y$ (and $\lambda$):
$$0=\frac{\partial F}{\partial x}=2x+2\lambda x-2\lambda$$
$$0=\frac{\partial F}{\partial y}=2y+2\lambda y+2\lambda$$
$$0=\frac{\partial F}{\partial\lambda}=x^2+y^2-2x+2y-2$$
So, $x=\frac{\lambda}{1+\lambda}$ and $y=-\frac{\lambda}{1+\lambda}$ and so $y=-x$, which you can in turn substitute in the third equation. You will end up with two solutions: $(1+\sqrt 2,-1-\sqrt 2)$ and $(1-\sqrt 2,-1+\sqrt 2)$, our of which the first one gives the larger value of $x^2+y^2+\sqrt{32}$ - I will leave it to you to finish off the calculation.
A: After square completion, there is a simple solution just using the triangle inequality for the Euklidean distance:
Using $(x-1)^2 + (y+1)^2 =4$ we get
$$x^2+y^2= \left(\left|\binom xy\right|\right)^2 \stackrel{\triangle-ineq.}{\leq} \left(\left|\binom{x-1}{y+1}\right| + \left|\binom{-1}{1}\right|\right)^2= (2+\sqrt 2)^2=6+4\sqrt2$$
Now, just add $\sqrt{32}$.
A: By C-S $$x^2+y^2=2(x-y)+2\leq2\sqrt{(1^2+(-1)^2)(x^2+y^2)}+2,$$ which gives
$$x^2+y^2-2\sqrt2\sqrt{x^2+y^2}+2\leq4$$ or
$$\left(\sqrt{x^2+y^2}-\sqrt2\right)^2\leq4,$$ which gives
$$\sqrt{x^2+y^2}\leq2+\sqrt2.$$
Id est, $$x^2+y^2+\sqrt{32}\leq(2+\sqrt2)^2+4\sqrt2=6+8\sqrt2.$$ The equality occurs for $x=1+\sqrt2$ and $y=-1-\sqrt2,$ which says that we got a maximal value.
