Determine the function that minimizes the functional .
First, compute the first variation so that it can be set to zero:
To get this only in terms of , integrate by parts. Let
Thus, setting the first variation to zero
Since is unspecified, suppose . Then
By the fundamental lemma, for all
From the initial condition, . Now, suppose . Then, the first variation gives
Substituting in gives
Therefore, the function that minimizes the functional is .