The Calculus of Variations in Maple 8
Copyright 2002 Waterloo Maple Inc
Introduction
The new VariationalCalculus package provides routines for solving problems in the calculus of variations, which studies nature's most "efficient" curves and surfaces. Classical problems from the calculus of variations include:
Such problems can often be solved with the Euler-Lagrange equation, which generalizes the Lagrange Multiplier Theorem for minimizing functions of real variables subject to constraints. The Euler-Lagrange equation is easy to write down in general but notoriously difficult to write down and solve for most practical problems. The VariationalCalculus package automates the construction and analysis of the Euler-Lagrange equation.
Example: The Brachistochrone Problem
The Brachistochrone problem can be stated as follows: Given two endpoints in the plane, find the curve y(x) between them such that a ball of unit mass rolls along the curve under the influence of gravity in minimum time.
First we write down the falling time over an infintesimal distance dx in terms of y(x) and yInit , assuming the gravitational constant is 1. This is found in standard textbooks on classical mechanics.
We then use the EulerLagrange function to compute the Euler-Lagrange equations for this functional in terms of y(x) and its derivatives. This returns a set of ODEs.
Extract the first ODE from the list
Compute y(x) as a parametric curve (x(s), y(s)) using the dsolve command with the parametric option.
Specify the endpoints of the curve: (0,1) and (1, 1/2)
The parameter s is not equivalent to time t , so we must solve for the value of s at which
Use the endpoints to solve for the unknown constants K[1] and _C1
The finite-length curve (x(s), y(s)) is parametrized over , so
The path along which a ball would roll in minimum time under the influence of gravity. The result is surprising because the curve actually dips below the right end point.