Tell me more ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

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?

share|improve this question
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.com Jul 6 '12 at 7:28

2 Answers

The question of course all depends on what kind of problem you have. If you have an energy functional that describes the position of a weight suspended from a spring, then the Euler-Lagrange equations are just an algebraic equation. On the other hand, if you have an energy equation that is described using an ODE, e.g. the position of a chain suspended from its end points as gravity acts on it, then you will get a two-point boundary value problem. Finally, if you have a multi-dimensional problem, then the Euler-Lagrange equations will be partial differential equations.

The point I want to make is that the type of problem you get in the Euler-Lagrange equations depends very much on the situation you are considering, and so the question of what discretization method to use can not be answered without seeing more context.

share|improve this answer

Mathematica has the package VariationalMethods which you may want to take a look at: http://reference.wolfram.com/mathematica/VariationalMethods/tutorial/VariationalMethods.html

For an example of how to set up the Euler-Lagrange equations for a problem and then use Mathematica to solve them, see the first example here: http://reference.wolfram.com/mathematica/VariationalMethods/ref/EulerEquations.html

share|improve this answer
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.