2.4.1.8 Example 8 \(xy^{\prime \prime }+xy^{\prime }+y=1,y\left ( 0\right ) =1\)
\begin{align*} xy^{\prime \prime }+xy^{\prime }+y & =1\\ y\left ( 0\right ) & =1 \end{align*}
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 homogeneous ode gives
\begin{align} x\sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-2}+x\sum _{n=0}^{\infty }\left ( n+r\right ) a_{n}x^{n+r-1}+\sum _{n=0}^{\infty }a_{n}x^{n+r} & =0\nonumber \\ \sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}x^{n+r-1}+\sum _{n=0}^{\infty }\left ( n+r\right ) a_{n}x^{n+r}+\sum _{n=0}^{\infty }a_{n}x^{n+r} & =0 \tag {1A}\end{align}
Adjusting indices to all powers of \(x\) to lowest power
\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 }\left ( n+r-1\right ) a_{n-1}x^{n+r-1}+\sum _{n=1}^{\infty }a_{n-1}x^{n+r-1}=0 \tag {1B}\end{equation}
For \(n=0\)
\[ \left ( r\right ) \left ( r-1\right ) a_{0}=0 \]
Since \(a_{0}\neq 0\) then the above gives roots are \(r_{1}=1,r_{2}=0\). Since the difference is integer, 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} & =Cy_{1}\ln x+x^{r_{2}}\sum _{n=0}^{\infty }b_{n}x^{n}\\ & =Cy_{1}\ln x+\sum _{n=0}^{\infty }b_{n}x^{n}\end{align*}
Substituting \(y_{1}\) into the ode gives (1B) but with \(r=1\) now. We will leave \(r\) as symbol to generate the table. This results in (as was done in the other examples)
| | |
| |
\(a_{n}\left ( r\right ) \) |
\(a_{n}\left ( r=0\right ) \) |
| | |
| \(a_{0}\) |
\(1\) |
\(1\) |
| | |
| \(a_{1}\) |
\(-\frac {1}{r}\) |
\(-1\) |
| | |
| \(a_{2}\) |
\(\frac {1}{r\left ( r+1\right ) }\) | \(\frac {1}{2}\) |
| | |
| \(a_{3}\) | \(\frac {-1}{r\left ( r+1\right ) \left ( r+2\right ) }\) | \(\frac {-1}{6}\) |
| | |
| \(\vdots \) |
\(\vdots \) |
\(\vdots \) |
| | |
Hence \(y_{1}\) is
\begin{align*} y_{1} & =\sum _{n=0}^{\infty }a_{n}x^{n+1}\\ & =x\sum _{n=0}^{\infty }a_{n}x^{n}\\ & =x\left ( a_{0}+a_{1}x+a_{2}x^{2}+\cdots \right ) \\ & =x\left ( 1-x+\frac {x^{2}}{2}-\frac {x^{3}}{6}+\frac {x^{4}}{24}+\cdots \right ) \end{align*}
To find \(y_{2}\) we first have to find if the log term is needed or not.
\begin{align*} \lim _{r\rightarrow r_{2}}a_{N}\left ( r\right ) & =\lim _{r\rightarrow 0}a_{1}\left ( r\right ) \\ & =\lim _{r\rightarrow 0}-\frac {1}{r}\end{align*}
Since limit does not exist, then we have to use the log term. This means
\begin{align*} y_{2} & =Cy_{1}\ln x+\sum _{n=0}^{\infty }b_{n}x^{n}\\ y_{2}^{\prime } & =C\left ( y_{1}^{\prime }\ln x+y_{1}\frac {1}{x}\right ) +\sum _{n=0}^{\infty }nb_{n}x^{n-1}\\ y_{2}^{\prime \prime } & =C\left ( y_{1}^{\prime \prime }\ln x+y_{1}^{\prime }\frac {1}{x}+y_{1}^{\prime }\frac {1}{x}-y_{1}\frac {1}{x^{2}}\right ) +\sum _{n=0}^{\infty }n\left ( n-1\right ) b_{n}x^{n-2}\end{align*}
Substituting this in the ode and simplifying and using fact that \(xy_{1}^{\prime \prime }+xy_{1}^{\prime }+y_{1}=0\) gives
\[ C\sum _{n=1}^{\infty }2a_{n-1}nx^{n-1}+C\sum _{n=2}^{\infty }a_{n-2}nx^{n-1}-C\sum _{n=1}^{\infty }a_{n-1}x^{n-1}+\sum _{n=0}^{\infty }n\left ( n-1\right ) x^{n-1}b_{n}+\sum _{n=1}^{\infty }\left ( n-1\right ) b_{n-1}x^{n-1}+\sum _{n=1}^{\infty }b_{n-1}x^{n-1}=0 \]
For \(n=0\) we choose \(b_{0}=1\) always. For \(n=1\) (which is the special case also, since \(N=1\)) the above gives
\begin{align*} 2Ca_{0}-Ca_{0}+b_{0} & =0\\ C & =-\frac {b_{0}}{a_{0}}\\ & =-1 \end{align*}
And we set \(b_{1}=0\) (always for the special case \(n=N\)). Now using the recursive relative for \(n>1\) gives
\begin{align*} 2Cna_{n-1}+Cna_{n-2}-Ca_{n-1}+n\left ( n-1\right ) b_{n}+\left ( n-1\right ) b_{n-1}+b_{n-1} & =0\\ -2na_{n-1}-na_{n-2}+a_{n-1}+n\left ( n-1\right ) b_{n}+\left ( n-1\right ) b_{n-1}+b_{n-1} & =0\\ b_{n} & =\frac {-\left ( n-1\right ) b_{n-1}-b_{n-1}+2na_{n-1}+na_{n-2}-a_{n-1}}{n\left ( n-1\right ) }\\ & =\frac {-nb_{n-1}+\left ( 2n-1\right ) a_{n-1}+na_{n-2}}{n\left ( n-1\right ) }\end{align*}
For \(n=2\)
\begin{align*} b_{2} & =\frac {-2b_{1}+3a_{1}+a_{0}}{2}\\ & =\frac {-3+1}{2}\\ & =-1 \end{align*}
And do on. we find
\begin{align*} y_{2} & =Cy_{1}\ln x+\sum _{n=0}^{\infty }b_{n}x^{n}\\ & =-y_{1}\ln x+\left ( b_{0}+b_{1}x+b_{2}x^{2}+\cdots \right ) \\ & =-y_{1}\ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \end{align*}
Hence
\begin{align} y_{h} & =c_{1}y_{1}+c_{2}y_{2}\tag {2}\\ & =c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +c_{2}\left ( -\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \nonumber \\ & =c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +c_{2}\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \nonumber \end{align}
Now we find \(y_{p}\). Let
\[ y_{p}=\sum _{n=0}^{\infty }c_{n}x^{n+r}\]
Substituting this into the original ode gives (1B) but with \(c_{n}\) in place of \(a_{n}\)
\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 }\left ( n+r-1\right ) c_{n-1}x^{n+r-1}+\sum _{n=1}^{\infty }c_{n-1}x^{n+r-1}=1 \tag {1C}\end{equation}
For \(n=0\)
\[ \left ( r\right ) \left ( r-1\right ) c_{0}x^{r-1}=x^{0}\]
For balance we need \(r-1=0\) or \(r=1\). Hence coefficient is
\[ 0c_{0}=1 \]
Not possible to solve for \(c_{0}\). No particular solution exist. No solution exist.
But sometimes this workaround ends up giving a solution. When the ode has form \(Ay^{\prime \prime }+By^{\prime }+y=a\) where \(a\) is constant, as in this case, we can do change of variable \(y=u+a\) first. The ode generated is then \(Au^{\prime \prime }+Bu^{\prime }+u+a=a\) or \(Au^{\prime \prime }+Bu^{\prime }+u=0\). Now we solve this and obtain solution given above in (2) but now with \(u\) instead of \(y\). In this example \(a=1\).
\[ u=c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +c_{2}\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \]
Replacing \(u=y-1\) the above becomes
\begin{equation} y-1=c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +c_{2}\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \tag {3}\end{equation}
Now we apply IC. At \(x=0\), \(y\left ( 0\right ) =1\) and the above gives
\begin{align*} 1-1 & =c_{1}\lim _{x\rightarrow 0}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +c_{2}\lim _{x\rightarrow 0}\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \\ 0 & =0+c_{2}\end{align*}
Hence \(c_{2}=0\). The solution (3) becomes
\begin{align} y-1 & =c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) \nonumber \\ y & =c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +1 \tag {4}\end{align}
This trick worked only because \(a\) happened to be same as what initial conditions \(y\left ( 0\right ) =a\). If there were different, then no solution exist. Lets see. Let IC be \(y\left ( 0\right ) =5\). Then let \(u=y-1\) and the equation below (3) above now becomes
\begin{align*} 5-1 & =c_{1}\lim _{x\rightarrow 0}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +c_{2}\lim _{x\rightarrow 0}\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \\ 4 & =0+c_{2}\\ c_{2} & =4 \end{align*}
And the solution (3) now becomes
\begin{align*} y-1 & =c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +4\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) \\ y & =c_{1}\left ( x-x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{6}+\frac {x^{5}}{24}+\cdots \right ) +4\left ( \left ( -x+x^{2}-\frac {x^{3}}{2}+\frac {x^{4}}{6}-\frac {x^{5}}{24}+\cdots \right ) \ln x+\left ( 1-x^{2}+\frac {3}{4}x^{3}-\frac {11}{36}x^{4}+\cdots \right ) \right ) +1 \end{align*}
Which does not verify the ode. So solution for this ode is given by (4).