Unlike static optimization problems, the basic problem of the calculus of variations is to find a function,
, such that some integral
is either a maximum or a minumum. In the above equation,
is the functional,
, and
is the independent variable, which is commonly separated by a semicolon to denote its independence. That is, knowing
in terms of general dependent variables on
, we have a problem in the calculus of variations that we may feel justified in solving using its techniques.
For
to be an extremum it is required that any neighboring function is not so maximized or minimized. We define a neighboring function by adding on arbitrary amounts to
, represented parametrically as
. For
,
is the function we pursue. Then
Now that we have defined variations on our solution, we can find the conditions such that our solution is an extremum by substituting in our parametrically defined
in our functional:
Taking the derivative of
,
From our definition of
, we can solve several of the above differential operations:
We substitute these back into the integrand to get
If we take a close look at this equation, we may notice that if we can somehow reduce
to
then we can factor out
and we will be left with something that must then be equal to zero. We can do this using integration by parts:
We have already defined
to be zero at the limits of integration, and therefore the first terms disappears. The second suites our hopes of being able to factor out
, as when we substitute it back into the initial equation
so that we then factor out the arbitrary function, leaving us with
's independence from
has now been established, and all that remains is to understand that since
is arbitrary, the remaining portion of the integrand must be equal to zero as a necessary condition for
to be an extremum. Thus,
This is the Euler equation.