2.4.1.3 Example 3 \(x^{2}y^{\prime \prime }+xy^{\prime }+\left ( x^{2}-4\right ) y=\frac {1}{x}\)

\[ x^{2}y^{\prime \prime }+xy^{\prime }+\left ( x^{2}-4\right ) y=\frac {1}{x}\]

This is same example as above but with \(\frac {1}{x}\) instead of \(1\) in the RHS. This is same as last example but with non zero on right side. We can find \(y_{h}\) as

\[ y_{h}=c_{1}\left ( x^{2}-\frac {1}{12}x^{4}+\frac {1}{384}x^{6}+\cdots \right ) +c_{2}\left ( -\frac {1}{12}\left ( x^{2}-\frac {1}{12}x^{4}+\frac {1}{384}x^{6}+\cdots \right ) \ln \left ( x\right ) +x^{-2}\left ( 1+\frac {1}{4}x^{2}-\frac {1}{288}x^{6}+\cdots \right ) \right ) \]

Let solution be \(y=y_{h}+y_{p}\). We just need to find \(y_{p}\). Assuming

\[ y_{p}={\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n+r}\]

Substituting this into the ode gives EQ. (2) in the above example but with \(c_{n}\) replacing \(a_{n}\) and with \(1\) now on the right side

\[ \sum _{n=0}^{\infty }\left ( \left ( n+r\right ) \left ( n+r-1\right ) +\left ( n+r\right ) -4\right ) c_{n}x^{n+r}+\sum _{n=2}^{\infty }c_{n-2}x^{n+r}=x^{-1}\]

For \(n=0\)

\[ \left ( r\left ( r-1\right ) +r-4\right ) c_{0}x^{r}=x^{-1}\]

For balance we need \(r=-1\). Hence the coefficient is

\begin{align*} \left ( r\left ( r-1\right ) +r-4\right ) c_{0} & =1\\ \left ( -1\left ( -2\right ) -1-4\right ) c_{0} & =1\\ -3c_{0} & =1\\ c_{0} & =-\frac {1}{3}\end{align*}

Hence

\begin{align*} y_{p} & ={\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n-1}\\ y_{p}^{\prime } & ={\displaystyle \sum \limits _{n=0}^{\infty }} \left ( n-1\right ) c_{n}x^{n-2}\\ y_{p}^{\prime \prime } & ={\displaystyle \sum \limits _{n=1}^{\infty }} \left ( n-1\right ) \left ( n-2\right ) c_{n}x^{n-3}\end{align*}

Substituting this into the ode gives

\begin{align*} x^{2}{\displaystyle \sum \limits _{n=1}^{\infty }} \left ( n-1\right ) \left ( n-2\right ) c_{n}x^{n-3}+x{\displaystyle \sum \limits _{n=0}^{\infty }} \left ( n-1\right ) c_{n}x^{n-2}+\left ( x^{2}-4\right ) {\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n-1} & =\frac {1}{x}\\{\displaystyle \sum \limits _{n=1}^{\infty }} \left ( n-1\right ) \left ( n-2\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=0}^{\infty }} \left ( n-1\right ) c_{n}x^{n-1}+x^{2}{\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n-1}-{\displaystyle \sum \limits _{n=0}^{\infty }} 4c_{n}x^{n-1} & =\frac {1}{x}\\{\displaystyle \sum \limits _{n=1}^{\infty }} \left ( n-1\right ) \left ( n-2\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=0}^{\infty }} \left ( n-1\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n+1}-{\displaystyle \sum \limits _{n=0}^{\infty }} 4c_{n}x^{n-1} & =\frac {1}{x}\end{align*}

Adjust all powers to lowest gives

\[{\displaystyle \sum \limits _{n=1}^{\infty }} \left ( n-1\right ) \left ( n-2\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=0}^{\infty }} \left ( n-1\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=2}^{\infty }} c_{n-2}x^{n-1}-{\displaystyle \sum \limits _{n=0}^{\infty }} 4c_{n}x^{n-1}=\frac {1}{x}\]

For \(n>0\) the right side is zero since no balance (no \(x^{n}\) terms with \(n>0\)). The above can then be written as

\[{\displaystyle \sum \limits _{n=1}^{\infty }} \left ( n-1\right ) \left ( n-2\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=0}^{\infty }} \left ( n-1\right ) c_{n}x^{n-1}+{\displaystyle \sum \limits _{n=2}^{\infty }} c_{n-2}x^{n-1}-{\displaystyle \sum \limits _{n=0}^{\infty }} 4c_{n}x^{n-1}=0 \]

For \(n=1\)

\begin{align*} -4c_{1} & =0\\ c_{1} & =0 \end{align*}

The recursive relation is for \(n\geq 2\) gives

\begin{align} \left ( n-1\right ) \left ( n-2\right ) c_{n}+\left ( n-1\right ) c_{n}+c_{n-2}-4c_{n} & =0\nonumber \\ c_{n} & =\frac {-c_{n-2}}{\left ( n-1\right ) \left ( n-2\right ) +\left ( n-1\right ) -4} \tag {1}\end{align}

For \(n=2\)

\begin{align*} c_{2} & =\frac {-c_{0}}{1-4}\\ & =\frac {\frac {1}{3}}{-3}\\ & =-\frac {1}{9}\end{align*}

For \(n=3\)

\begin{align*} c_{n} & =\frac {-c_{1}}{\left ( n-1\right ) \left ( n-2\right ) +\left ( n-1\right ) -4}\\ & =0 \end{align*}

Since \(c_{1}=0\). For \(n=4\)

\begin{align*} c_{4} & =\frac {-c_{1}}{\left ( 3\right ) \left ( 2\right ) +\left ( 4-1\right ) -4}\\ & =\frac {\frac {1}{9}}{\left ( 3\right ) \left ( 2\right ) +\left ( 4-1\right ) -4}\\ & =\frac {1}{45}\end{align*}

And so on. Hence

\begin{align*} y_{p} & ={\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n+r}\\ & =x^{-1}{\displaystyle \sum \limits _{n=0}^{\infty }} c_{n}x^{n}\\ & =x^{-1}\left ( c_{0}+c_{1}x+c_{2}x^{2}+\cdots \right ) \\ & =\frac {1}{x}\left ( -\frac {1}{3}-\frac {1}{9}x^{2}+\frac {1}{45}x^{4}-\cdots \right ) \\ & =\left ( -\frac {1}{3x}-\frac {1}{9}x+\frac {1}{45}x^{3}-\cdots \right ) \end{align*}

Therefore the complete solution is

\begin{align*} y & =y_{h}+y_{p}\\ & =c_{1}\left ( x^{2}-\frac {1}{12}x^{4}+\frac {1}{384}x^{6}+\cdots \right ) +c_{2}\left ( -\frac {1}{12}\left ( x^{2}-\frac {1}{12}x^{4}+\frac {1}{384}x^{6}+\cdots \right ) \ln \left ( x\right ) +x^{-2}\left ( 1+\frac {1}{4}x^{2}-\frac {1}{288}x^{6}+\cdots \right ) \right ) +\left ( -\frac {1}{3x}-\frac {1}{9}x+\frac {1}{45}x^{3}-\cdots \right ) \end{align*}