[SciPy-user] lagrange multipliers in python

Alan G Isaac aisaac@american....
Sun Jun 17 12:41:23 CDT 2007


On Sun, 17 Jun 2007, "fdu.xiaojf@gmail.com" apparently wrote: 
> I still don't quite understand how to liminate linear 
> equality constraints.  Could you please point me to some 
> web resources that describe this method in detail? Or what 
> key words I should use if I want to google on the web? 

Perhaps an example would be useful.

Example: solve the bivariate constrained minimization problem
min x1**2 + x2**2
subject to: 2 x1 + 3 x2 = 5

Reparametrize constraint:
Particular Soln: (1,1)
General soln: x = (1,1) + (1,-2/3)y

So solve the unconstrained univariate problem:
min (1+y)**2  + (1-2y/3)**2
-> y = -3/13
-> x = (1,1) + (1,-2/3)(-3/13) = (10/13,15/13)

hth,
Alan Isaac




More information about the SciPy-user mailing list