Euler's equation can be used to find curves or trajectories that extremize (minimize or maximize) functionals which are defined as integrals along curves. It does this by requiring the first variation of the integral, with respect to variations of the curve, to vanish. This results in an equation involving derivatives of the integrand which must be satisfied by any extremizing curve. Examples include finding geodesics as curves of shortest distance, surfaces of minimal area obtained by rotating curves, and trajectories that extremize the action in physics.