\documentclass[12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\dy}{\frac{dy}{dx}}
\parindent=0pt
\begin{document}

{\bf Question}

Find the general solution to each of the following equations

\begin{enumerate}

\item $x^2y''-2y=0 $

\item $x^2y''+xy'+4y=0\qquad (*)$

\item $x^2y''-3xy'+4y=\ln x \qquad (*)$

\item $x^2y''+7xy'+5y=x   \qquad (*)$

\end{enumerate}


\vspace{0.25in}

{\bf Answer}

For all the following problems note that if $\ds t=\ln x, \,\,\,\,
x=e^t$ and

$\ds y(x)=Y(t)$ then $\ds \frac{dy}{dx}=e^{-t}\frac{dY}{dt},
\,\,\,\,\frac{d^2y}{dx^2}=e^{-2t}\frac{d^2Y}{dt^2}-e^{-2t}\frac{dY}{dt}$.

\begin{itemize}
\item[a)]
$\ds x^2y''-2y=0 \Rightarrow
e^{2t}\left(e^{-2t}Y''-e^{-2t}Y'\right)-2Y=0$

$\ds Y''-Y'-2Y=0$, try $\ds Y=e^{mt}, \,\,\,\, m^2-m-2=0, \,\,\,\,
m=-1, \,\,\,\, m=2$

$\ds Y=Ae^{-t}+Be^{2t} \Rightarrow y=A\frac{1}{x}+Bx^2$

\item[b)]
$\ds x^2y''+xy'+4y=0 \Rightarrow
e^{2t}\left(e^{-2t}Y''-e^{-2t}Y'\right)+e^t\left(e^{-t}Y'\right)+4Y=0$

$\ds Y''++4Y=0,$ try $\ds Y=e^{mt}, \,\,\,\, m^2+4=0, \,\,\,\,
m=2i, \,\,\,\, m=-2i$

$\ds Y=Ae^{2it}+B^{-2it}$ or (more sensibly), $\ds
Y=C\cos(2t)+D\sin(2t)$

$\ds y=C\cos(2\ln x)+D\sin(2\ln x)$

\item[c)]
$\ds x^2y''-3xy'+4y=\ln x$

$\ds \Rightarrow
e^{2t}\left(e^{-2t}Y''-e^{-2t}Y'\right)-3e^t\left(e^{-t}Y'\right)+4Y=\ln\left(e^t\right)$

$\ds \Rightarrow Y''-4Y'+4Y=t$

First find $\ds Y_c, \,\,\,\, Y''-4Y+4Y=0 \Rightarrow m^2-4m+4=0$

$\ds \Rightarrow m=2$ (repeated).  So $\ds Y_c=Ae^{2x}+Bxe^{2x}$

Now find $\ds Y_{PI}$ by either variation of parameters or
undetermined constants.

Try $\ds Y_{PI}=Dt+E \Rightarrow 0-4(D)+4(Dt+E)=t \Rightarrow
4D=1$

$\ds \Rightarrow D=\frac{1}{4}, \,\,\,\, -4D+4E=0 \Rightarrow
E=\frac{1}{4}$

$\ds Y_{PI}=\frac{1}{4}t+\frac{1}{4}$

$\ds Y=Ae^{2x}+Bxe^{2x}+\frac{1}{4}t+\frac{1}{4} \Rightarrow
y(x)=Ax^2+Bx^3+\frac{1}{4}\ln t+\frac{1}{4}$

\item[d)]
$\ds x^2y''+7xy'+5y=x$

$\ds \Rightarrow
e^{2t}\left(e^{-2t}Y''-e^{-2t}Y'\right)+7e^t\left(e^{-t}Y'\right)+5Y=e^t$

$\ds \Rightarrow Y''+6Y'+5Y=e^t$

First find $\ds Y_c, \,\,\,\, Y_c''+6Y_c'+5Y_c=0$

$\ds \Rightarrow m^2-6m+5=0, \,\,\,\, m=-1,-5, \,\,\,\,
Y_c=Ae^{-t}+Be^{-5t}$

Find $\ds Y_{PI}$ by variation of parameters or undetermined
coefficients.

Try $\ds Y_{PI}=De^t \Rightarrow (D+6D+5D)e^t=e^t \Rightarrow
D=\frac{1}{12}$

$\ds Y_{PI}=\frac{1}{12}e^t$

$\ds Y=Ae^{-t}+Be^{-5t}+\frac{1}{12}e^t \Rightarrow
y(x)=A\left(\frac{1}{x}\right)+B\left(\frac{1}{x}\right)^5+\frac{1}{12}x$
\end{itemize}


\end{document}
