# Setting up Lagrange problem

#### Yatzy3D

##### New member
I want to find the point on the ellipse that is the intersection between the plane x+y+z=1 and the cylinder x[SUP]2[/SUP] + y[SUP]2[/SUP] = 1 that is furthest away from (0,0). I'm pretty sure this can be solved by using Lagrange, but I can't figure out how to set up the expression.

Last edited:

#### Subhotosh Khan

##### Super Moderator
Staff member
I want to find the point on the eclipse (ellipse?) that is the intersection between the plane x+y+z=1 and the cylinder x[SUP]2[/SUP] + y[SUP]2[/SUP] = 1 that is furthest away from (0,0). I'm pretty sure this can be solved by using Lagrange, but I can't figure out how to set up the expression.
I would start with calculating the equation of the ellipse (curve of intersection).

#### HallsofIvy

##### Elite Member
The function to be minimized is the square of the distance $$\displaystyle f(x, y, z)= x^2+ y^2+ z^2$$ subject to the constraints $$\displaystyle g(x, y, z)= x+ y+ z= 1$$ and $$\displaystyle h(x, y, z)= x^2+ y^2= 1$$.

The first thing I would notice is that, since $$\displaystyle x^2+ y^2= 1$$, the function to be minimized reduces to $$\displaystyle f(z)= 1+ z^2$$. That is minimized when z= 0. And the condition that x+ y+ z= 1 means that x+ y= 1 so y= 1- x. Using, again, $$\displaystyle x^2+ y^2= 1$$, we have $$\displaystyle x^2+ 1- 2x+ x^2= 2x^2- 2x+ 1= 1$$. So $$\displaystyle 2x^2- 2x= 2x(x- 1)= 0$$. $$\displaystyle x= 0$$, in which case $$\displaystyle y= 1$$ or $$\displaystyle x= 1$$, in which case $$\displaystyle y= 0$$.

The solutions are $$\displaystyle (0, 1, 0)$$ or $$\displaystyle (1, 0, 0)$$.

#### Yatzy3D

##### New member
The function to be minimized is the square of the distance $$\displaystyle f(x, y, z)= x^2+ y^2+ z^2$$ subject to the constraints $$\displaystyle g(x, y, z)= x+ y+ z= 1$$ and $$\displaystyle h(x, y, z)= x^2+ y^2= 1$$.

The first thing I would notice is that, since $$\displaystyle x^2+ y^2= 1$$, the function to be minimized reduces to $$\displaystyle f(z)= 1+ z^2$$. That is minimized when z= 0. And the condition that x+ y+ z= 1 means that x+ y= 1 so y= 1- x. Using, again, $$\displaystyle x^2+ y^2= 1$$, we have $$\displaystyle x^2+ 1- 2x+ x^2= 2x^2- 2x+ 1= 1$$. So $$\displaystyle 2x^2- 2x= 2x(x- 1)= 0$$. $$\displaystyle x= 0$$, in which case $$\displaystyle y= 1$$ or $$\displaystyle x= 1$$, in which case $$\displaystyle y= 0$$.

The solutions are $$\displaystyle (0, 1, 0)$$ or $$\displaystyle (1, 0, 0)$$.
I'm pretty sure these are the points closest to (0,0). As you can see here:edited imgur site

Last edited by a moderator:

Staff member
Last edited: