\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\newcommand{\undb}{\underbrace}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}

{\bf Question}

The following notation is used in this question.

$$y=y(x),\ y'=\ds\frac{dy}{dx},\ y''=\ds\frac{d^2y}{dx^2}.$$

You may assume that al $y$ are sufficiently differentiable
functions.

\begin{description}
\item[(a)]
For what $A$ does the following functional have an extremal? Find
the associated value of $I$.

$$I=\ds\int_0^1 dx\ (\frac{1}{2}y^2+2y'y+ye^x)\ ,$$

$$y(0)=-1,\ y'(0)=A$$

\item[(b)]
Find the extremal value of $J$ where,

$$J=\ds\int_0^1 dx\ (y+2xy'+\frac{1}{2}{y''}^2)\,$$

$$y(0)=0,\ y'(0)=0,\ y(1)=\ds\frac{1}{24},\
y'(1)=\ds\frac{1}{6}.$$

Be sure that you carefully explain your methods.
\end{description}

\medskip

{\bf Answer}

\begin{description}
\item[(a)]
$$I=\ds\int_0^1 dx\ \left(\ds\frac{y^2}{2}+2y'y+ye^x\right)$$

$$y(0)=1,\ y'(0)=A$$

Euler-Lagrange:

$\ds\frac{dF}{dy}-\ds\frac{d}{dx}\left(\ds\frac{\pl F}{\pl
y'}\right)=0$ with

$$F=\ds\frac{y^2}{2}+2y'y+ye^x$$

$\ds\frac{\pl F}{\pl y}=y+2y'+e^x$

$\ds\frac{\pl F}{\pl y'}=2y$

$\begin{array}{c} \rm{Therefore}\\\rm{Therefore}\\\rm{Therefore}
\end{array}
\begin{array}{c} y+2y'+e^x-\ds\frac{d}{dx}(2y)=0\\y+e^x=0\\
\un{y=-e^x} \end{array}$

\ Therefore \begin{eqnarray*} y(0) & = & -e^{-0}=-1\ \
\surd\surd\\ y'(0) & = & \left.-e^x\right|_{x=0}=-1
\end{eqnarray*}

Therefore \un{need $A=-1$}.

Therefore with $y=-e^x$

\begin{eqnarray*} I & = & \ds\int_0^1 dx\
\left(\ds\frac{e^{2x}}{2}+2e^{2x}-e^{2x}\right)\\ & = &
\ds\frac{3}{2}\ds\int_0^1 dx\ e^{2x}\\ & = &
\ds\frac{3}{2}\left[\ds\frac{e^{2x}}{2}\right]_0^1\\ I & = &
\un{\ds\frac{3}{4}(e^2-1)} \end{eqnarray*}

\item[(b)]
$I=\ds\int_0^1 dx\ \left(y+2xy'+\ds\frac{{y''}^2}{2}\right)$

$\begin{array}{rcl}y(0) & = & 1\\ y'(0) & = & 0\\ y(1) & = &
\ds\frac{1}{24}\\ y'(1) & = & \ds\frac{1}{6} \end{array}$

$$F=y+2xy'+\ds\frac{{y''}^2}{2}$$

\newpage
Euler-Lagrange equation is:

$$\ds\frac{d^2}{dx^2}\left(\ds\frac{\pl F}{\pl
y''}\right)-\ds\frac{d}{dx}\left(\ds\frac{\pl F}{\pl
y'}\right)+\ds\frac{\pl F}{\pl y}=0$$

$$\ds\frac{\pl F}{\pl y''}=\ds\frac{2y''}{2};\ \ds\frac{\pl F}{\pl
y'}=2x;\ \ds\frac{\pl F}{\pl y}=1$$

Therefore
$\ds\frac{d^2}{dx^2}\left(\ds\frac{2y''}{2}\right)-\ds\frac{d}{dx}(2x)+1=0$

Therefore $\ds\frac{2y''''}{2}-2+1=0$

Therefore $\un{y''''=1}$

Therefore

\begin{eqnarray*} y''' & = & x+A\\y'' & = &
\ds\frac{x^2}{2}+Ax+B\\ y' & = &
\ds\frac{x^3}{6}+\ds\frac{Ax^2}{2}+Bx+C\\ y & = &
\ds\frac{x^4}{24}+\ds\frac{Ax^3}{6}+\ds\frac{Bx^2}{2}+Cx+D
\end{eqnarray*}

Boundary conditions:

\begin{eqnarray*} y(0)=0 & \Rightarrow & D=0\\ y'(0)=0 &
\Rightarrow & C=0\\ y(1)=\ds\frac{1}{24} & \Rightarrow &
\ds\frac{1}{24}=\ds\frac{1}{24}+\ds\frac{A}{6}+\ds\frac{B}{2}\\ &
\Rightarrow & \un{A+3B=0}\ \ \ (1) \end{eqnarray*}

\begin{eqnarray*} y'(1)=\ds\frac{1}{6} & \Rightarrow &
\ds\frac{1}{6}=\ds\frac{1}{6}+\ds\frac{A}{2}+B\\ & \Rightarrow &
\un{A+2B=0}\ \ \ (2) \end{eqnarray*}

\newpage
$(1)-(2)\ \Rightarrow B=0 \Rightarrow A=0$

Therefore $y=\ds\frac{x^4}{24}$

Hence

\begin{eqnarray*} I & = & \ds\int_0^1 dx\
\left(\ds\frac{x^4}{24}+2x \cdot
\ds\frac{x^3}{6}+\ds\frac{1}{2}\left(\ds\frac{x^2}{2}\right)^2\right)\\
& = & \ds\int_0^1 dx\
x^4\left(\ds\frac{1}{24}+\ds\frac{1}{3}+\ds\frac{1}{8}\right)\\ &
= & \ds\frac{1}{5} \times \left(\ds\frac{1}{2}\right)\\ & = &
\un{\ds\frac{1}{10}} \end{eqnarray*}

$$u=F=G$$

$u(x,0)=F(x)+G(x0=f(x)$

$u_t(x,0)=-cF'(x)+cG'(x)=g(x)$

$F+G=f$

$-F'+G'=\ds\frac{1}{c}g$

$-F(x)+G(x)=\ds\frac{1}{c}\ds\int_A^x g(s)\, ds$

$F+G=f$

$G(x)=\ds\frac{1}{2}f(x)+\ds\frac{1}{2c}\ds\int_A^x g(s)\, ds$

$F(x)=\ds\frac{1}{2}f(x)-\ds\frac{1}{2c}\ds\int_A^x g(s)\, ds$

$F(x-ct)+G(x+ct)=\ds\frac{1}{2}z[f(x-ct)+f(x+ct)]$

$?????
(x,t)=\ds\frac{1}{2}\left[f(x-ct)+f(x+ct)+\ds\frac{1}{2c}\ds\int_{x-ct}^{x+ct}g(s)
\, ds\right]$

$+\ds\frac{1}{2c}\ds\int_{x-ct}^{x+ct}g(s)
ds+\ds\frac{1}{2c}\ds\int_{x-???ct}^A g(s)\, ds$
\end{description}
\end{document}
