2.4.1.6 Example 6 \(xy^{\prime \prime }+y=x\)

\begin{equation} xy^{\prime \prime }+y=x \tag {1}\end{equation}

Let solution be \(y=y_{h}+y_{p}\). We always start by finding \(y_{h}\) then find \(y_{p}\) using balance method. \(x=0\) is regular singular point. Hence Frobenius series gives

\[ y\left ( x\right ) =\sum _{n=0}^{\infty }a_{n}x^{n+r}\]

Where \(r\) is to be determined. It is the root of the indicial equation. Therefore

\begin{align*} y^{\prime }\left ( x\right ) & =\sum _{n=0}^{\infty }\left ( n+r\right ) a_{n}x^{n+r-1}\\ y^{\prime \prime }\left ( x\right ) & =\sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-2}\end{align*}

Substituting the above in (1) gives

\begin{align} x\sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-2}+\sum _{n=0}^{\infty }a_{n}x^{n+r} & =x\nonumber \\ \sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-1}+\sum _{n=0}^{\infty }a_{n}x^{n+r} & =x \tag {1A}\end{align}

Adjusting indices to all powers of \(x\) are the same gives

\begin{equation} \sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-1}+\sum _{n=1}^{\infty }a_{n-1}x^{n+r-1}=x \tag {1B}\end{equation}

The indicial equation is found from only the terms with the expansion of the dependent variable \(y\). This means by making the LHS of (3) vanish. We only consider

\begin{equation} \sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-1}+\sum _{n=1}^{\infty }a_{n-1}x^{n+r-1}=0 \tag {1C}\end{equation}

For \(n=0\)

\begin{equation} \left ( r\right ) \left ( r-1\right ) a_{n}x^{r-1}=0\nonumber \end{equation}

EQ (1D) is used to find \(r\). Since \(a_{0}\neq 0\) then (1D) gives

\[ \left ( r\right ) \left ( r-1\right ) =0 \]

Hence roots are \(r_{1}=1,r_{2}=0\). Hence the two basis solution for \(y_{h}\) are

\begin{align*} y_{1} & =x^{r_{1}}\sum _{n=0}^{\infty }a_{n}x^{n}=\sum _{n=0}^{\infty }a_{n}x^{n+1}\\ y_{2} & =C_{1}y_{1}\ln x+x^{r_{2}}\sum _{n=0}^{\infty }b_{n}x^{n}\\ & =C_{1}y_{1}\ln x+\sum _{n=0}^{\infty }b_{n}x^{n}\end{align*}

To find \(y_{1},\) we can find the recursive equation to be for \(n>0\)

\[ a_{n}=-\frac {a_{n-1}}{n\left ( n+1\right ) }\]

Which results in

\[ y_{1}=x-\frac {x^{2}}{2}+\frac {x^{3}}{12}-\frac {x^{4}}{144}+\frac {x^{5}}{2880}+\cdots \]

Finding \(y_{2}\) is a little more involved because we need to determine \(C\). This can be found to be \(C=-1\). Using this we can find

\[ y_{2}=\left ( -x+\frac {x^{2}}{2}-\frac {x^{3}}{12}+\frac {x^{4}}{144}-\frac {x^{5}}{2880}+\cdots \right ) \ln x+\left ( 1-\frac {3}{4}x^{2}+\frac {7x^{3}}{36}-\cdots \right ) \]

Hence

\begin{align} y_{h} & =c_{1}y_{1}+c_{2}y_{2}\nonumber \\ & =c_{1}\left ( x-\frac {x^{2}}{2}+\frac {x^{3}}{12}-\frac {x^{4}}{144}+\frac {x^{5}}{2880}+\cdots \right ) +c_{2}\left ( \left ( -x+\frac {x^{2}}{2}-\frac {x^{3}}{12}+\frac {x^{4}}{144}-\frac {x^{5}}{2880}+\cdots \right ) \ln x+\left ( 1-\frac {3}{4}x^{2}+\frac {7x^{3}}{36}-\cdots \right ) \right ) \tag {2}\end{align}

What is left is to find \(y_{p}\). Let

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

Substituting this into the ode \(xy^{\prime \prime }+y=x\) and simplifying as we did above results in

\begin{equation} \sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) c_{n}x^{n+r-1}+\sum _{n=1}^{\infty }c_{n-1}x^{n+r-1}=x \tag {3A}\end{equation}

For \(n=0\)

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

Hence for balance we need \(r-1=1\) or \(r=2\). Therefore \(\left ( r\right ) \left ( r-1\right ) c_{0}=1\) and solving for \(c_{0}\) gives \(c_{0}=\frac {1}{2}\). Therefore (3A) becomes

\begin{equation} \sum _{n=0}^{\infty }\left ( n+2\right ) \left ( n+1\right ) c_{n}x^{n+1}+\sum _{n=1}^{\infty }c_{n-1}x^{n+1}=x \tag {3B}\end{equation}

Now that we used \(n=0\) to find \(r\) by matching against the RHS which is \(x\), from now on, for all \(n>0\) we will use (3B) to solve for all other \(c_{n}\). From now on, we just need to solve with RHS zero, since there can be no more matches for any \(x\) on the right. For \(n=1\) then (3B) gives

\[ 6c_{1}x^{2}+c_{0}x^{2}=0 \]

Hence \(6c_{1}+c_{0}=0\) or \(c_{1}=-\frac {c_{0}}{6}=\frac {-1}{12}\). For \(n=2\), EQ(3B) gives

\[ 12c_{2}x^{3}+c_{1}x^{3}=0 \]

Hence \(12c_{2}+c_{1}=0\) or \(c_{2}=-\frac {c_{1}}{12}=-\frac {\frac {-1}{12}}{12}=\frac {1}{144}\). For \(n=3\), EQ(3B) gives

\[ 20c_{3}x^{4}+c_{2}x^{4}=0 \]

Hence \(20c_{3}+c_{2}=0\) or \(c_{3}=-\frac {c_{2}}{20}=-\frac {\frac {1}{144}}{20}=-\frac {1}{2880}\) and so one. Therefore

\begin{align} y_{p} & =\sum _{n=0}^{\infty }c_{n}x^{n+r}\nonumber \\ & =\sum _{n=0}^{\infty }c_{n}x^{n+2}\nonumber \\ & =c_{0}x^{2}+c_{1}x^{3}+c_{2}x^{4}+c_{3}x^{5}+\cdots \nonumber \\ & =\frac {1}{2}x^{2}-\frac {1}{12}x^{3}+\frac {1}{144}x^{4}-\frac {1}{2880}x^{5}+\cdots \tag {4}\end{align}

Hence the final solution is

\[ y=y_{h}+y_{p}\]

Where \(y_{h}\) is given by (2) and \(y_{p}\) is given by (4).