Consider the below functional
$F=\int_0^L dx [d_x f(x)]^2,$
with boundary conditions
$\cos 2 f(0)=\cos 2 f(L),$
$\sin 2 f(0)=\sin 2 f(L)$.
Are the set of functions $f(x)=\frac{n \pi x}{L}$ (with integer $n$), local minimums of $F$? Is there any way to show that these are local minimums? Obviously, the case $n=0$ is the global minimum.
Let $ G ( u , v , w ) = w ^ 2 $. Then $ F [ f ] = \int _ 0 ^ L G \big( x , f ( x ) , f ' ( x ) \big) \ \mathrm d x $. The local minimizers of $ F $ must satisfy the Euler-Lagrange equation: $$ \frac { \partial G } { \partial v } \big( x , f ( x ) , f ' ( x ) \big) - \frac { \mathrm d } { \mathrm d x } \left( \frac { \partial G } { \partial w } \big( x , f ( x ) , f ' ( x ) \big) \right) = 0 $$ That simply shows $ f '' ( x ) = 0 $, and hence there are constants $ a $ and $ b $ such that $ f ( x ) = a x + b $. The boundary conditions are equivalent to existence of an integer $ n $ with $ 2 f ( L ) = 2 f ( 0 ) + 2 n \pi $. Thus we have $ a L + b = b + n \pi $, which shows that $ a = \frac { n \pi } L $. Therefore local minimizers are of the form $ f ( x ) = \frac { n \pi } L x + b $.
To show that each of those functions are actually local minimizers, it's sufficient to prove that the second variation of $ F $ is strictly positive.
$$ F [ f + \epsilon \eta ] = \int _ 0 ^ L G \big( x , f ( x ) + \epsilon \eta ( x ) , f ' ( x ) + \epsilon \eta ' ( x ) \big) \ \mathrm d x = \\ \int _ 0 ^ L f ' ( x ) ^ 2 \ \mathrm d x + 2 \epsilon \int _ 0 ^ L f ' ( x ) \eta ' ( x ) \ \mathrm d x + \epsilon ^ 2 \int _ 0 ^ L \eta ' ( x ) ^ 2 \ \mathrm d x $$
$$ \delta ^ 2 F [ f , \eta ] = \left[ \frac { \mathrm d ^ 2 } { \mathrm d \epsilon ^ 2 } F [ f , \eta ] \right] _ { \epsilon = 0 } = \int _ 0 ^ L \eta ' ( x ) ^ 2 \ \mathrm d x = \| \eta ' \| \ge \frac 4 { L ^ 2 } \| \eta \| ^ 2 $$
For a proof of the above inequality, see this post for example.