Calculus of variation aims to determine a function that minimises/maximises a value: distance, time, energy etc.
Introduction
A Functional accepts a function to produce a scalar. For eg. Distance functional calculates the distance traversed by the function from to . By setting the boundary condition of and we can get a finite value from the Functional.
It adds up small arc length along . Thus computing the distance effectively.
This particular integrand (Function being integrated) requires only the derivative of the function, but other types of Integrant might use , or . Thus we can make a general integrant given as below.
Suppose is an extremal (minimises/maximises Functional ). The boundary condition is given as and .
Suppose we slightly perturb with an arbitrary function to get , to ensure it satisfies a boundary condition we set and . Since is an extremal. The perturbation will cause a small difference to the Functional .
If is truly extremal, then should be at the minimum/maximum when .
Thus
Next we evaluate the partial derivatives at thus replacing with .
Using integration by parts on the second segment of the equation. Let and .
Since .
Thus plugging it back into the above equation.
Since is an arbitrary function (with fixed boundary points). The only way for the integral to be 0. Is if