# Ngô Quốc Anh

## June 7, 2008

### Maple Symbolic Computation in the Calculus of Variations I

Filed under: Nghiên Cứu Khoa Học — Ngô Quốc Anh @ 8:43

We firstly describe what a Euler–Lagrange equation is. We refer you to http://en.wikipedia.org/wiki/Euler-Lagrange for details. The Euler–Lagrange equation is an equation satisfied by a function of a real parameter which extremises the functional $J = \int_a^b {f\left( {x,y\left( x \right),y'\left( x \right)} \right)dx} .$

By some simple computation, the Euler–Lagrange equation then is the ordinary differential equation $\frac{{\partial J}} {{\partial y}}\left( {x,y\left( x \right),y'\left( x \right)} \right) - \frac{d} {{dx}}\frac{{\partial J}} {{\partial y'}}\left( {x,y\left( x \right),y'\left( x \right)} \right) = 0.$

A standard example is finding the shortest path between two points in the plane. Assume that the points to be connected are and . The length of a path between these two points is $\int_a^b {\sqrt {1 + \left( {y'\left( y \right)} \right)^2 } dx} = \int_a^b {\sqrt {1 + \left( {\frac{{dy}} {{dx}}} \right)^2 } dx} .$

The Euler–Lagrange equation yields the differential equation $0 - \frac{d} {{dx}}\frac{\partial } {{\partial y'}}\left( {\sqrt {1 + \left( {y'} \right)^2 } } \right) = 0$

or equivalently $\frac{d} {{dx}}\frac{{y'}} {{\sqrt {1 + \left( {y'} \right)^2 } }} = 0.$

Thus is a constant. In other words, a straight line.

In Maple, by using VariationalCalculus package, we can compute the Euler–Lagrange equation as following: Assume that we want to extremises the functional $J = \int_{ - 1}^0 {\left( {12xy - \left( {y'} \right)^2 } \right)dx}$

with and . Then just type

> with(VariationalCalculus);
> L := (12*x*y(x)-diff(y(x),x)^2);
> eqEL := EulerLagrange(L,x,y(x));
> dsolve({op(eqEL),y(-1)=1,y(0)=0}, y(x));

The result is , see below. With no initial conditions, try

> dsolve(eqEL, y(x));

## Leave a Comment »

No comments yet.

This site uses Akismet to reduce spam. Learn how your comment data is processed.