# Minimization constraints without using Lagrange Multiplier

Currently, I am working on an unconstrained energy minimization function, but I need to add some constraints. My system is a 2D lattice with a force applied to it, and I want the sides to be able to move, but the length of each side to be constant.

I know that using a Lagrange multiplier could make the terms I want to stay constant, constant by making the energy cost so huge that it won't move anything. But I was wondering if there was a different way to add constraints to the system without changing the fact that the energy minimization is unconstrained.

• More like I want to add parameters to the unconstrained minimization. Jun 16 '15 at 16:10
• In the lattice, there are nodes and bonds that connect them. A force is applied at the top and the lattice is allowed to have it's bonds stretch or bend. I want to make it so the bonds along only the sides cannot change length. I cannot simply let dx=dy=0 nor sqrt(dx^2 + dy^2)=0 because the bending energy has mixed terms. Jun 16 '15 at 16:27
• What about using a penalty method? Jun 16 '15 at 20:34
• In addition to using penalty methods as @nicoguaro suggests, you could also transform the degrees of freedom to a different representation, such as bond angle + bond length rather than absolute position. A simpler case to try first would be the double pendulum, then the n-pendulum, then the full lattice. I think there are some helpful examples in Goldstein's classical mechanics book, or Hand and Finch Analytical Mechanics. Jun 16 '15 at 20:57
• Why do you want to avoid multipliers? Jun 16 '15 at 23:25

• If you have a constraint of the form $g(x_1,...,x_N)=0$, then you may be able to write it as $x_N=f(x_1,...,x_{N-1})$ and thereby simply eliminate one of the variables from your problem. You then don't need the constraint any more. (Of course, it may be that your constraint doesn't allow you to eliminate $x_N$ but another variable, with the same result.)