6.8 Example 9. \(xy^{\prime }+y=\frac {1}{x^{2}}\)
\begin{equation} xy^{\prime }+y=x^{-2}\tag {1}\end{equation}
This is same as example 1, but with nonzero on RHS. The solution is \(y=y_{h}+y_{p}\). Where \(y_{h}\) was found above as
\[ y_{h}=\frac {a_{0}}{x}\]
To find \(y_{p}\) we assume it has power series
\[ y_{p}=\sum _{n=0}^{\infty }c_{n}x^{n+r}\]
Substituting the above into the ode and simplifying as we did in first example gives EQ. 3 in the above example, but now with \(x^{-2}\) on RHS
\begin{equation} \sum _{n=0}^{\infty }\left ( n+r\right ) c_{n}x^{n+r}+\sum _{n=0}^{\infty }c_{n}x^{n+r}=x^{-2}\tag {3A}\end{equation}
For \(n=0\)
\begin{align*} rc_{0}x^{r}+c_{0}x^{r} & =x^{-2}\\ \left ( r+1\right ) c_{0}x^{r} & =x^{-2}\end{align*}
For balance \(r=-2\). And \(\left ( r+1\right ) c_{0}=1\) or \(c_{0}=-1\). Hence (3A) becomes
\begin{equation} \sum _{n=0}^{\infty }\left ( n-2\right ) c_{n}x^{n-2}+\sum _{n=0}^{\infty }c_{n}x^{n-2}=x^{-2}\tag {3B}\end{equation}
The recursive relation for \(n>0\) is
\begin{align} \left ( n-2\right ) c_{n}x^{n-2}+c_{n}x^{n-2} & =0\nonumber \\ \left ( n-1\right ) c_{n}x^{n-2} & =0\tag {3C}\end{align}
We see that for all \(n>0\) then \(\left ( n-1\right ) c_{n}=0\). or \(c_{n}=0\) for all \(n>0\). Hence \(y_{p}\) that corresponds to \(x^{-2}\) is
\begin{align*} y_{p} & =\sum _{n=0}^{\infty }c_{n}x^{n+r}\\ & =\sum _{n=0}^{\infty }c_{n}x^{n-2}\\ & =c_{0}x^{-2}\\ & =-x^{-2}\end{align*}
Hence the solution is
\begin{align*} y & =y_{h}+y_{p}\\ & =\frac {a_{0}}{x}-\frac {1}{x^{2}}\end{align*}