| Suppose you have a mechanical system such as masses, springs, or
gravitiational potentials, constraints such as coupled linkages,
etc. This has associated with it a phase space - the positions and
velocities. The positions may be space coordinates, or may
be "generalized coordinates" like angles, likewise the velocites
may be rates of change of the generalized coordinates.
The laws of mechanics lead to a system of second order differential
equations, and a point in phase space is an initial condition that
you can solve from.
The Lagrangian point of view is to instead think of the evolution
of the system as the path through phase space that minimizes
a functional of the generalized coordinates called the Lagrangian
(which can also depend on time.) This is the principle of
least action. Fermat's principle, etc.
In many cases, the Lagrangian is the difference between potential
energy and kinetic energy, so it may be easier to formulate a problem
using ideas of energy conservation.
Another nice thing about Lagrangian formalism is it works for
quantum mechanics and other not purely mechanical problems.
There's also a related Hamiltonian formalism which transforms the
second order differential equations into a system of first order
equations along with a Hamiltonian function.
It's actually pretty cool stuff. I'd recommend finding a book by
Vladimar Arnold, _Mathematical Methods for Classical Mechanics_.
I've dabbled with computer simulation of some of these things -
the N-body particle problem under Newtonian gravitation with
3D lighting and shading of the particles is easy to do and really
neat looking.
- Jim
|
|
I spent some time last night pawing through my old differential
equations textbook, which for all intents and purposes was completely
unrecognizable to me.
There was a section or two on 'affine equations' that led up to a
section on Lagrange's relation. Lagranges relation is not limited to
second order differential equations, but there was an extended
discussion of the second order special case.
Even after reading it, I don't really understand it.
The motivation for this comes from portfolio optimization. Working
from memory, the relations are:
Define the following symbols:
n - the number of securities in the portfolio
Ri - the total return of security i. R is the
vector of security returns.
Wi - the proportion of total assets invested in
security i. W is the vector of these weights.
Rp - target portfolio return
Cij - the covariance of returns of securities i and j.
The variance of security i is Cii, the total
portfolio variance is W C W'.
under the conditions that
W * 1 = 1 (the weights sum to 1)
W R = Rp (target return achieved)
we want to minimize weighted portfolio variance W C W' for any
desired level of return Rp. To do this, we form the Lagrangian:
L = W C W' + lambda1 (W*1 - 1) + lambda2 (W R - Rp);
where lambda1 and lambda2 are unspecified multipliers.
So what is the idea behind including the constraints in this fashion?
/Jim
|
| Oh, that's another, related Lagrangian idea.
Say you want to do contstrained minimization of f(x, y) subject
to the requirement that g(x, y) = 0.
g(x, y) defines one or more curves in the xy plane (it could be
x^2 + y^2 = r^2 for a circle centered at the origin for example, or
even a function which has several branches of curves...)
You want to find the point on the submanifold of points satisfying
g(x, y) = 0 (which is a trivial curve in this case) that also
minimizes the value of f(x, y). If you draw a picture of a line
cutting thru contour curves for f(x, y), you will see that any local
minimum will be at a point where the level curves for f and g are
tangent.
Lagrange's idea is to introduce a free variable and globally minimize
F(x, y, l) = f(x, y) + l*g(x, y)
The stationary point occurs where the gradient vanishes, by analogy
with the unconstrained case.
Taking the gradient with respect to x, y, and l, we require
dF/dx = df/dx + l*dg/dx = 0
dF/dy = df/dy + l*dg/dy = 0
dF/dl = 0 + g(x, y) = 0 (since f and g are independant of l)
The first two equations say that the gradients of f and g are
parallel, and the third satisfys the constraint.
It's not hard to see how this fits what your optimization is
doing.
I gave the wrong answer origionally because what you're asking for
is usually known as introducing Lagrange multipliers rather than
forming the Lagrangian.
- Jim
|