For a variation preserving both endpoint values and slopes, at the endpoints. The first variation is
Integrate the last term twice and the middle term once. All boundary terms vanish, giving
The fundamental lemma of the calculus of variations yields the higher-order Euler-Lagrange equation
For the present functional this becomes . Its general solution is . The left endpoint gives and . The right endpoint then gives
The coefficient determinant is , so , . The stationary function is .
For any admissible perturbation , exact quadratic expansion, followed by the stationarity equation and integration by parts, gives
Apply the supplied Poincare inequality first to , then to , whose endpoint values also vanish:
Thus for every admissible perturbation, proving a global maximum through the clamped second-variation inequality.