# Is there a package for computing and discretizing Euler-Lagrange equations?

I have an energy functional that I want to optimize using the calculus of variations. Is there any software package that will do this automatically?

As far as I can tell, Maple and Mathematic have some relevant functionality, and they can generate C code as well. However, I could not find a working example. Are there any available working examples that use Mathematica?

Are there any other specialized packages that will solve these sorts of problems?

-
 I'm going to bump this over to Computational Science, since this is much more relevant there. Also, from what you describe you should read up on finite element methods. They may be quite applicable. – Willie Wong Jul 6 '12 at 7:27

## migrated from math.stackexchange.comJul 6 '12 at 7:28

Mathematica has the package VariationalMethods which you may want to take a look at: http://reference.wolfram.com/mathematica/VariationalMethods/tutorial/VariationalMethods.html
 I wanted something which also descretize the equations – Shan Jul 5 '12 at 17:11 Use NDSolve instead of DSolve. reference.wolfram.com/mathematica/ref/NDSolve.html – nullUser Jul 5 '12 at 17:45