
Calculus Calculus Math Forum 
 LinkBack  Thread Tools  Display Modes 
September 11th, 2018, 08:11 AM  #1 
Banned Camp Joined: Mar 2015 From: New Jersey Posts: 1,720 Thanks: 124  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}}$ Then $\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: Optimization with 2 variables in the objective function and 3 variables in constraint  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. Last edited by skipjack; September 11th, 2018 at 12:49 PM. 

Tags 
constraint, lagrange, multiplier, variables 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Need help with Lagrange multiplier...  Caesar95  Calculus  2  May 2nd, 2015 08:04 AM 
Lagrange multiplier method  Brazen  Calculus  1  January 15th, 2013 10:29 AM 
Lagrange multiplier (am I doing this right?)?  trey01  Applied Math  2  March 25th, 2012 07:14 AM 
The Lagrange multiplier method  dk1702  Abstract Algebra  1  July 21st, 2010 05:25 AM 
Lagrange Multiplier Fix..  roonaldo17  Calculus  0  November 16th, 2008 11:27 AM 