\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\newcommand{\undb}{\underbrace}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
In what follows you may assume that the following notation applies

$$y=y(x),\ y'=\ds\frac{dy}{dx}.$$

You may also assume that, unless otherwise stated, $y$ is a
sufficiently continuously differentiable function.

{\bf Question} Find the critical curves of the functionals

\begin{description}
\item[(i)]
$\ds\int_a^b (y^2+{y'}^2-2y \sin x) \,dx$

\item[(ii)]
$\ds\int_a^b (y^2-{y'}^2-2y \sin x) \,dx$

\item[(iii)]
$\ds\int_a^b (y^2-{y'}^2-2y \cosh x) \,dx$

\item[(iv)]
$\ds\int_a^b (y^2+{y'}^2-2y e^x) \,dx$
\end{description}



\medskip

{\bf Answer}
\begin{description}
\item[(i)]
$F(y,y',x)=y^2+{y'}^2-2y\sin x$

$\ds\frac{\pl F}{\pl y}=2y-2\sin x;\ \ds\frac{\pl F}{\pl y'}=2y'$

E-L equation becomes:

$\begin{array} {crcl} & (2y-2\sin x)-\ds\frac{d}{dx}(2y') & = &
0\\ \Rightarrow y-\sin x-y'' & = & 0\\ \Rightarrow & y''-y & = &
-\sin x \end{array}$

Inhomogeneous 2nd order linear equation ODE with constant
coefficients.

So $y=y_{comp.func.}+y_{partic.int.}$

$y_{cf}Ae^{mx}+Be^{-mx}$ where $A$ and $B$ are constants

where by substitution

$m^2-1=0 \Rightarrow m=\pm 1$

Therefore $y_{cf}=Ae^x+Be^{-x}$

\newpage
For particular integral try

$y_{PI}=C\cos x+D\sin x$

${y'}_{PI}=-C\sin x+D\cos x$

${y''}_{PI}=-C\cos x-D\sin x$

Substitution in (1) gives

$-C\cos x-D\sin x-C\cos x-D\sin x=-\sin x$

$\Rightarrow C=0,\ D=\ds\frac{1}{2}$

Therefore $t=Ae^x+Be^{-x}+\ds\frac{1}{2}\sin x$ is extremal
function would need to find $A$ and $B$ using boundary data; but
we haven't been given any (only that $x=a$ and $x=b$ are the end
points)






\item[(ii)]
$F(y,y',x)=y^2-{y'}^2-2y\sin x$

$\ds\frac{\pl F}{\pl y}=2y-2\sin x;\ \ds\frac{\pl F}{\pl y'}=-2y'$

E-L equation becomes:

$\begin{array} {crcl} & (2y-2\sin x)-\ds\frac{d}{dx}(-2y') & = &
0\\ \Rightarrow y-\sin x+y'' & = & 0\\ \Rightarrow & y''+y & = &
\sin x \end{array}$ (2)

Same type of equation as in (i). Use same method to get solution

$y=-\ds\frac{1}{2}x\cos x+A\cos x+B\sin x$

$A$ and $B$ to be determined from boundary data.


\item[(iii)]
$F(y,y',x)=y^2-{y'}^2-2y\cosh x$

$\ds\frac{\pl F}{\pl y}=2y-2\cosh x;\ \ds\frac{\pl F}{\pl
y'}=-2y'$

E-L equation becomes:

$\begin{array} {crcl} & (2y-2\cosh x)-\ds\frac{d}{dx}(-2y') & = &
0\\ \Rightarrow y-\cosh x+y'' & = & 0\\ \Rightarrow & y''+y & = &
\cosh x \end{array}$ (2)

Same type of equation as above. Use similar method to get solution

$y=-\ds\frac{1}{2}\cosh x+A\cos x+B\sin x$

$A$ and $B$ to be determined from boundary data.

\item[(iv)]
$F(y,y',x)=y^2+{y'}^2+2ye^x$

$\ds\frac{\pl F}{\pl y}=2y+2e^x;\ \ds\frac{\pl F}{\pl y'}=2y'$

E-L equation becomes:

$\begin{array} {crcl} & (2y+2e^x)-\ds\frac{d}{dx}(2y') & = & 0\\
\Rightarrow y+e^x-y'' & = & 0\\ \Rightarrow & y''-y & = & e^x
\end{array}$

Same type of equation as above. Use similar methods to get
solution

$y=-\ds\frac{1}{2}xe^x+Ae^x+Be^{-x}$

$A$ and $B$ to be determined from boundary data.
\end{description}
\end{document}
