# CoV24

Determine the function ${\hat {y}}\in C^{2}[0,1]\,$ that minimizes the functional $J(y)=\int _{0}^{1}\left[y'(x)\right]^{2}dx+[y(1)]^{2},y(0)=1,h(0)=0\,$.

First, compute the first variation so that it can be set to zero:

 $\delta J(y,h)\,$ $={\frac {d}{d\varepsilon }}J(y+\varepsilon h)\left.\right|_{{\varepsilon =0}}$ $={\frac {d}{d\varepsilon }}\left[\int _{0}^{1}(y^{\prime }(x)+\varepsilon h^{\prime }(x))^{2}\ dx+(y(1)+\varepsilon h(1))^{2}\right]\left.\right|_{{\varepsilon =0}}$ $=\left[\int _{0}^{1}2(y^{\prime }(x)+\varepsilon h^{\prime }(x))h^{\prime }(x)\ dx+2(y(1)+\varepsilon h(1))h(1)\right]\left.\right|_{{\varepsilon =0}}$ $=\int _{0}^{1}2y^{\prime }(x)h^{\prime }(x)\ dx+2y(1)h(1)$

To get this only in terms of $h\,$, integrate by parts. Let

 $u=2y^{\prime }(x)$ $du=2y^{{\prime \prime }}(x)\ dx$ $dv=h^{\prime }(x)\ dx$ $v=h(x)\,$

Thus, setting the first variation to zero

 $2y^{\prime }(x)h(x)\left.\right|_{0}^{1}-\int _{0}^{1}2y^{{\prime \prime }}(x)h(x)\ dx+2y(1)h(1)$ $=0\,$ $2y^{\prime }(1)h(1)-\int _{0}^{1}2y^{{\prime \prime }}(x)h(x)\ dx+2y(1)h(1)$ $=0\,$

Since $h(1)\,$ is unspecified, suppose $h(1)=0\,$. Then

 $-2\int _{0}^{1}y^{{\prime \prime }}(x)h(x)\ dx$ $=0\,$

By the fundamental lemma, for all $h(x)\,$

 $y^{{\prime \prime }}(x)$ $=0\,$ $y^{\prime }(x)$ $=c_{1}\,$ $y(x)\,$ $=c_{1}x+c_{2}\,$

From the initial condition, $y(0)=1\Longrightarrow c_{2}=1$. Now, suppose $h(1)=1\,$. Then, the first variation gives

 $2y^{\prime }(1)\cdot 1-(0)+2y(1)\cdot 1$ $=0\,$ $2y^{\prime }(1)+2y(1)$ $=0\,$

Substituting in gives

 $2(c_{1})+2(c_{1}+c_{2})\,$ $=0\,$ $4c_{1}+2(1)\,$ $=0\,$ $c_{1}\,$ $=-{\frac {1}{2}}\,$

Therefore, the function that minimizes the functional is ${\hat {y}}=-{\frac {x}{2}}+1$.