Many problems involve finding a function that maximizes or minimizes an
integral expression.
One example is finding the curve giving the
shortest distance between two
points -- a straight line, of course, in Cartesian geometry (but can you prove
it?) but less obvious if the two points lie on a curved
surface (the problem of finding geodesics.)
The mathematical techniques developed to solve this type of problem
are collectively known as the calculus of variations.