10182

# Lagrange Multipliers in One Dimension

This Demonstration shows how Lagrange multipliers work in one dimension. The 1D solution is trivial, as the solution is given by the constraint. Nevertheless, the 1D problem exhibits some essential features of the situation. The 2D problem, which is more difficult to visualize, is treated in another Demonstration.
The method of Lagrange multipliers takes the problem of finding the extreme value of a function subject to a constraint and replaces it with the problem of solving the equation subject to the same constraint. In one dimension, there is not much to this; we simply choose so that and to satisfy . The visual effect of this choice of (right panel) is to adjust the blue tangent so that it is parallel to the red tangent, or, equivalently, adjust the green tangent so that it is horizontal.

### DETAILS

The formal idea of the Lagrange multipliers is to replace the problem of finding the extremum of a function with a constraint , where is a constant, with the problem of finding critical points of the function subject to the same constraint.
Of course, in 1D, the Lagrange multiplier technique is useless, as the solution is trivially given by solving the constraint , whatever the function may be. Nonetheless, the 1D view, trivial as it may be, provides everything that is needed to understand the geometrical meaning of the Lagrange multiplier.
Indeed, it can be seen that is nothing but a rescaled , and that the function is nothing but the difference in height between and . When both functions are parallel, the difference is constant, giving the solution of the problem.
This height difference can be understood as a new potential in a nonequilibrium () or equilibrium () state.
A few explanations about both graphs follow.
The graph on the left is the original problem ( and ).
The graph on the right is the problem solved with a Lagrange multiplier ( and ). The height of the green curve is the green area. The thick lines are the tangents to the three functions. You can change their length with the slider to check the red and blue tangents are parallel and the green tangent is horizontal.
When modifying the constraint , the Lagrange multiplier is computed (equilibrium ), but the interactive (nonequilibrium) value of can be modified to get the feeling of its meaning. The key point is that when varies, it modifies the slope of everywhere (by rescaling ), and the equilibrium value is the one that compensates for the variation (which, in the 2D case, will restore the - independence).
It is interesting to note that, when choosing , takes the form (from ), and the new potential is the Legendre transform of .
As an example, in statistical mechanics, the temperature is the inverse of a Lagrange multiplier that arises when one wants to optimize the number of states given the global constraint . This gives to the meaning of a natural scale unit for an energy-constrained statistical system.
Another example is given by the thermodynamical potentials that appear here as constrained minimized energies.
In this formalism, the Lagrange multiplier is nothing but a scale (mathematical viewpoint) and dimensional (physics viewpoint) factor. Its physical meaning is that of a "number of thing to minimize per unit constraint": .
Since the value of the Lagrange multiplier is determined by the constraint, it is interesting to note that a natural scale arises from any optimization with a global constraint. For instance, the temperature (natural scale unit energy of the system) is a direct consequence of the global constraint .
Seeing the Lagrange multiplier as a scaling factor can be of some interest in the paradigm of Laurent Nottale's scale relativity, where the scales become fundamental coordinates of any physical description.
The 2D treatment adds more subtle ideas but is more complex to visualize. Hence it is the subject of a second Demonstration.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.
 © 2015 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS
 Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX Download or upgrade to Mathematica Player 7EX I already have Mathematica Player or Mathematica 7+