Consider the problem of finding the curve y(x) of shortest length that connects the two points (0, 0) and (1, 1) in the plane. Letting ds be an element of arc length, the arc length of a curve y(x) from x = 0 to x = 1 is ds. We can use Pythagoras' theorem to relate ds to dx and dy: drawing a triangle with sides of length dx and dy at right angles to one another, the hypotenuse is ds and so ds2 = dx2 + dy2 and s = = dx. This means the arc length equals dx.
The curve y(x) we are looking for minimizes the functional