PDA

View Full Version : Lagrange Multipliers - Implicitly defined curve


philnow
Nov3-09, 02:27 PM
1. The problem statement, all variables and given/known data

Use Lagrange Multipliers to find the points closest to the origin on the curve defined implicitly by

x2-xy+y2-z2 = 1
x2+y2=1

2. The attempt at a solution

I know how to do this for regular curves, but I don't know where to start with implicitly defined ones. Any hints to get me started? Thanks in advance.

foxjwill
Nov3-09, 05:11 PM
Well, first of all, that's not the curve you're supposed to minimize. You want to find the points closest to the origin, so you need to minimize the function
\sqrt{x^2+y^2+z^2}.

philnow
Nov3-09, 07:12 PM
How did you get to that?

lurflurf
Nov3-09, 08:00 PM
That is the distence formula. Though one could also use x^2+y^2+z^2 since square root is monotone.
The method is
suppose we wish to optimize L subject to conditions
optimize L(x,y,z) subject to
f(x,y,z)=0
g(x,y,z)=0

Introduce M=L+s f+t g
a condition on M will be the system
Mx=0
My=0
Mz=0
Ms=0
Mt=0

Where subscipts denote partial derivatives

philnow
Nov4-09, 11:03 AM
I don't understand why the constraints are f(x,y,z)=0 and g(x,y,z)=0, I also don't understand what the M = condition is for... this is one of my first problems with implicitly defined functions. Anyone care to attempt to clarify? Thanks...

philnow
Nov4-09, 05:19 PM
Anyone? I've always been stuck on these types of problems, if anyone could bite the bullet and help the noob I would strongly appreciate it.

foxjwill
Nov4-09, 06:09 PM
I don't understand why the constraints are f(x,y,z)=0 and g(x,y,z)=0, I also don't understand what the M = condition is for... this is one of my first problems with implicitly defined functions. Anyone care to attempt to clarify? Thanks...

We want to minimize the distance to the origin, right? Well, that is given by the function D(x,y,z)=\sqrt{x^2+y^2+z^2}. But we can just choose any (x,y,z) -- we want to find the minimum value of the set {D(x,y,z) | f(x,y,z)=0 and g(x,y,z)=0}. A real number d is in this set if and only if for some point (x,y,z) the distance D(x,y,z)=d and f(x,y,z)=0 and g(x,y,z)=0. We want to find the smallest such d. In other words, we want to find all points (x0,y0,z0) on your implicitly defined curve whose distance D(x0,y0,z0) from the origin is less than or equal to the distance from the origin of all the other points on that curve.

But how do we do this? Let's ignore g(x,y,z) for a moment and try to how to minimize D(x,y,z) subject only to f(x,y,z)=0:

Recall that the gradient of a function is a vector pointing in the direction of fastest descent. Keeping this in mind, suppose that \nabla D is parallel to \nabla f at some point (x,y,z). What does this mean? Well, the definition of parallel vectors says that at that point, \nabla D+\lambda \nabla f=0
for some number \lambda. Here's the cool part: if that point satisfies our requirement that f(x,y,z)=0, then \nabla f vanishes, and the above equation gives\nabla D=0; in other words, that point is an extremum of D(x,y,z)! Thus, all we need to do is solve the system of equations
\begin{align*}
\nabla D+\lambda \nabla f &= 0\\
f(x,y,z) &= 0
\end{align*}
for x,y,z,\lambda, and \mu.

Ok, so how do we work in the condition g(x,y,z)=0? Well, since we already have the gradients of D and f parallel, we don't want to disturb that. So, let's try making both of those also parallel to \nabla g. In other words, we want points such that
\nabla D +\lambda\nabla f + \mu\nabla g=0
for some \lambda and \mu. Now here's where the cool part comes in again: if g(x,y,z)=0 and f(x,y,z)=0, then both of their gradients vanish, and \nabla D=0! Thus, all we need to do is solve the system of equations

\begin{align*}
\nabla D+\lambda \nabla f +\mu\nabla g&= 0\\
f(x,y,z) &= 0\\
g(x,y,z) &= 0
\end{align*}

for x,y,z,\lambda, and \mu.

Incidentally, this is where the M= condition you asked about came from. If we define M=D+\lambda f +\mu g, then setting the gradient of M equal to zero gives the first equation in the system, and setting the derivatives with respect to \lambda and \mu equal to zero gives the second and third.

philnow
Nov4-09, 07:08 PM
Thank you so much, that made it very clear.

foxjwill
Nov4-09, 07:31 PM
You're very welcome!