= Solution
For a variation $y+\varepsilon\eta$ with $\eta=\eta'=0$ at both endpoints, the <first variation> is
$$
\delta I=\int_{x_0}^{x_1}
(f_y\eta+f_{y'}\eta'+f_{y''}\eta'')\,dx.
$$
Two applications of <integration by parts> remove derivatives from $\eta$. The boundary terms vanish, and the <fundamental lemma of the calculus of variations> gives the <higher-order Euler-Lagrange equation>
$$
\boxed{f_y-\frac d{dx}f_{y'}+\frac{d^2}{dx^2}f_{y''}=0.}
$$
For the stated integrand,
$$
f_y=2y,\qquad f_{y'}=4y'+2y'',\qquad f_{y''}=2(y'+y''),
$$
so the equation reduces to
$$
y^{(4)}-2y''+y=0,
\qquad (D^2-1)^2y=0.
$$
The general solution of this <linear ordinary differential equation> is
$$
y=(A+Bx)e^x+(C+Dx)e^{-x}.
$$
Decay and finiteness of the integral force $A=B=0$; $y(0)=1$ gives $C=1$, and $y'(0)=2$ gives $D=3$. Hence the unique stationary function is
$$
\boxed{y(x)=(3x+1)e^{-x}.}
$$
Back to article page