\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt

QUESTION

Solve the following differential equations subject to the given
initial conditions.

\begin{description}

\item[(i)]
$(x+1)\frac{dy}{dx}=x+6$, where $y=3$ when $x=0$.

\item[(ii)]
$x\frac{dy}{dx}+(3x+1)y=e^{-3x}$, where $y=e^{-3}$ when $x=1$.

\item[(iii)]
$2\frac{d^2y}{dx^2}-5\frac{dy}{dx}-3y=0$, where $y=1$ and
$\frac{dy}{dx}=3$ when $x=0$.

\item[(iv)]
$\frac{d^2y}{dx^2}-10\frac{dy}{dx}+25y=0$, where $y=1$ and
$\frac{dy}{dx}=1$ when $x=1$.

\end{description}



ANSWER


\begin{description}

\item[(i)]

\begin{eqnarray*}
&&\frac{dy}{dx}=\frac{x+6}{x+1}=1+\frac{5}{x+1}\\
&\Rightarrow&y=x+5\ln|x+1|+c\ 3=5\ln1+c\textrm{ so }c=3\\
&\Rightarrow&y=x+5\ln|x+1|+3
\end{eqnarray*}

\item[(ii)]

$\frac{dy}{dx}+\left(3+\frac{1}{x}\right)y=\frac{1}{xe^{3x}}$

Integrating factor:
$e^{\int3+\frac{1}{x}\,dx}=e^{(3x+\ln|x|)}=|x|e^{3x}$. So for
$x>0,$

$$\frac{d(xe^{3x}y)}{dx}=\frac{1}{xe^{3x}}.xe^{3x}\Rightarrow
xe^{3x}y$$

$$\int1\,dx\Rightarrow y=\frac{x+C}{xe^{3x}}:\
e^{-3}=\frac{c+1}{e^3}\Rightarrow C=0$$

so $y=\frac{1}{e^{3x}}$

\item[(iii)]
Auxiliary equation: $2\lambda^2-5\lambda-3=0$ factorises as
$(2\lambda+1)(\lambda-3)$ so $\lambda=3, -\frac{1}{2}$ with
solutions $y=Ae^{3x}+Be^{-\frac{1}{2}x}$. $1=A+B,\
3=3A-\frac{1}{2}B$ from initial conditions so
$3\frac{1}{2}B=0\Rightarrow B=0$ and $A=1$ giving $y=e^{3x}$.

\item[(iv)]
Auxiliary equation: $\lambda^2-10\lambda+25=0$ factorises as
$\lambda-5)^2$ so there is a unique solution $\lambda=5$.
$y=(A+Bx)e^{5x}$.

$$\frac{dy}{dx}=Be^{5x}+5(A+Bx)e^{5x}=(5A+B+5Bx)e^{5x}$$

$1=(A+B)e^5$ and $1=(5A+6B)e^5$ from the initial conditions so
$5=Ae^5$ or $A=5e^{-5}$ and so $Be^5=1-5e^{-5}$ i.e $B=-4e^{-5}$
and $y=(5-4x)e^{5(x-1)}$

\end{description}





\end{document}
