# Find all local maxima and minima of $x^2+y^2$ subject to the constraint $x^2+2y=6$. Does $x^2+y^2$ have a global max/min on the same constraint?

This is my method for the local max/min. Does this answer sound sensible? (Not sure how to go about checking for global max/min though...)

Method

$G(x,y)=x^2+2y-6$. Rewrite in terms of $y$, so $y=((-x^2+6)/2)^2$. Then $y$ substitute into $f(x)$ so:

$f(x)=x^2+((-x^2+6)/2)^2=-2x^2+(x^4/4)+9$.

So $f'(x)=-4x+4x^3$. And if $f'(x)=0$ then $x=0,x=1$

And $f''(x)=-4+12x^2$ so when $x=0$ then $f''(x)=-4$ so there is a maximimum when $x=0$.

There is a local maximum at (0,3) with value 9.

When $x=1$ then $f''(x)=8$ so there is a minimum when $x=1$.

There is a local minimum at (1/5/2) with value 29/4.

I also tried answering this question via an alternative method using a Lagrange function, to check my result but I got a different answer...

• $x^2+2y=6$ is the equation of a parabola. The question about global max/min is asking, whether there is a nearest point on the parabola to the origin, and whether there is a farthest point on the parabola to the origin. – Lord Shark the Unknown Jan 13 '18 at 18:13
• $x^2+2y=6\implies y =\frac 12 (6-x^2)$. – lulu Jan 13 '18 at 18:13

try it with $$F(x,y,\lambda)=x^2+y^2+\lambda(x^2+2y-6)$$ and solve the System $$2x+2x\lambda=0$$ $$2y+2\lambda=0$$ $$x^2+2y-6=0$$

• Shouldn't it be minus $λ(x2+2y−6)$ rather than plus? When I try it this way it get (2,1) and (-2,1) as stationary points, but not also (0,3) as a stationary point (which I believe should be one!) – Maths Barry Jan 14 '18 at 10:36

There is a simple geometric interpretation which allows to avoid calculus completely: you are looking for the maximum/minimum (squared) distance from the origin for a point on the parabola with equation $y=3-\frac{x^2}{2}$. It is pretty clear (by convexity) that there is no maximum. There is a simple way for drawing the tangent to a parabola at a given point, hence checking that the circle centered at the origin through $(2,1)$ is tangent to the given parabola. So the wanted minimum is $5$.

The given parabola can be parameterized as follows

$$\left\{ \left(t,3-\frac 12 t^2\right) : t \in \mathbb R \right\}$$

Thus, the objective function can be written in terms of $t$

$$t^2 + \left(3-\frac 12 t^2\right)^2 = \frac 14 t^4 - 2 t^2 + 9$$

Differentiating with respect to $t$ and finding where the derivative vanishes, we obtain

$$t (t-2) (t+2) = 0$$

where $t=0$ maps to $(0,3)$, a local maximizer, and $t=\pm2$ map to $(\pm2,1)$, both global minimizers.

From $x^2+2y=6$ we get $x^2=6-2y$

Substitute in $x^2+y^2$ to get $$x^2+y^2=y^2-2y+6$$ Note that $y^2-2y+6=(y-1)^2+5$.

Thus the minimum is attained when at $y=1$ at two points where and $x=2$ or $x=-2$

There is no global for $(y-1)^2+5$, hence there is no global maximum for $x^2+y^2$ subject to $x^2+2y=6$.