My Math Forum

My Math Forum (
-   Calculus (
-   -   Lagrange Multiplier with more constraint variables (

zylo September 11th, 2018 08:11 AM

Lagrange Multiplier with more constraint variables
Extrema of f(x,y) with constraint g(x,y)=0

$\displaystyle f_{x}dx+f_{y}dy=0$ at an extremum, but dx and dy not independent:
$\displaystyle g_{x}dx+g_{y}dy=0$
$\displaystyle dy=-\frac{g_{x}}{g_{y}}dx$
$\displaystyle f_{x}dx+f_{y}(-\frac{g_{x}}{g_{y}}dx)=0$
$\displaystyle (f_{x}-\frac{f_{y}}{g_{y}}g_{x})dx=0$ for arbitrary dx $\displaystyle \rightarrow f_{x}-\frac{f_{y}}{g_{y}}g_{x}=0
Let $\displaystyle \lambda =\frac{f_{y}}{g_{y}}$
$\displaystyle f_{y}-\lambda g_{y}=0$
$\displaystyle f_{x}-\lambda g_{x}=0$
$\displaystyle g(x,y)=0$
are 3 eqs in 3 unknowns x,y,$\displaystyle \lambda$

As a purely formal rule, the equations can be gotten by setting partial derivatives wrt x,y,$\displaystyle \lambda$ equal to zero of:
L(x,y,$\displaystyle \lambda$)=f(x,y)-$\displaystyle \lambda$(g(x,y)

For extrema of f(x,y,z) with constraint g(x,y,z)=0:

$\displaystyle f_{x}dx+f_{y}dy+f_{z}dz=0$ at an extremum, but dx,dy,dz not independent:
$\displaystyle g_{x}dx+g_{y}dy+g_{z}dz=0$
$\displaystyle dy=-\frac{g_{x}}{g_{y}}dx-\frac{g_{z}}{g_{y}}dz$
$\displaystyle f_{x}dx+f_{y}(-\frac{g_{x}}{g_{y}}dx-\frac{g_{z}}{g_{y}}dz)+f_{z}dz=0$
$\displaystyle (f_{x}-\frac{f_{y}}{g_{y}}g_{x})dx+(f_{z}-\frac{f_{y}}{g_{y}}g_{z})dz=0$
arbitrary dx and dz $\displaystyle \rightarrow f_{x}-\frac{f_{y}}{g_{y}}g_{x}=f_{z}-\frac{f_{y}}{g_{y}}g_{z}=0$
Let $\displaystyle \lambda = \frac{f_{y}}{g_{y}}$ and you have Lagrange's multiplier.

As a formal rule to get the equations, set to 0 partial derivatives wrt x,y,z,$\displaystyle \lambda$ of L(x,y,z,$\displaystyle \lambda$)=f(x,y,z)-$\displaystyle \lambda$ g(x,y,z):
$\displaystyle \frac{\partial L }{\partial x}=f_{x}-\lambda g_{x}=0$
$\displaystyle \frac{\partial L }{\partial y}=f_{y}-\lambda g_{y}=0$
$\displaystyle \frac{\partial L }{\partial z}=f_{z}-\lambda g_{z}=0$
$\displaystyle \frac{\partial L }{\partial \lambda}=g(x,y,z)=0$

Now consider extrema of f(x,y) subject to g(x,y,z) = 0

$\displaystyle f_{x}dx+f_{y}dy=0$
$\displaystyle g_{x}dx+g_{y}dy+g_{z}dz=0$
To change independent variable to, say, dx and dz, solve latter equation for for dy and plug into former to get:
$\displaystyle (f_{x}-\frac{f_{y}}{g_{y}}g_{x})dx-\frac{f_{y}}{g_{y}}g_{z}dz=0$
Now setting the coefficients of dx and dz (arbitray) to zero and letting
$\displaystyle \lambda = \frac{f_{y}}{g_{y}}$, gives the modified form of Lagrange's equations for this case:
$\displaystyle f_{x}-\lambda g_{x}=0$
$\displaystyle f_{y}-\lambda g_{y}=0$
$\displaystyle \lambda g_{z}=0$
$\displaystyle g(x,y,z)=0$
Formally, you get the equations, as before, from:
L(x,y,z,$\displaystyle \lambda$) = f(x,y)-$\displaystyle \lambda$ g(x,y,z)
by taking partial derivatives wrt x,y,z,$\displaystyle \lambda$ and setting them equal to 0.

The latter procedure was used by JeffM1 in:

For the case of more than one constraint:

Extrema of f(x,y,z,w) and g(x,y,z,w) and h(x,y,x,w)
Solve for the differentials of dz and dw in terms of dx and dy from dg=0 and dh=0.
Then substitute into df=0 and equate the coefficients of dx and dy to zero. It will be obvious what to label $\displaystyle \lambda$1 and $\displaystyle \lambda$2 as, and everything will fall into place.

Forget the formulas, grasp the simple principle:
At an extreme, df(x,y,z,w,..)=0 for arbitrary dx, dy, dz, dw... (independent). So their coefficients must be zero.

I have taken pains to do this because I never came across Lagrange multipliers except as a rule which I didn't understand.

All times are GMT -8. The time now is 05:46 AM.

Copyright © 2019 My Math Forum. All rights reserved.