Example 1 \[ y^{\prime }+2xy=\sqrt {x}\] Expansion is around \(x=0\). The (homogenous) ode has the form \(y^{\prime }+p\left ( x\right ) y=0\). We see that \(p\left ( x\right ) \) is analytic at \(x=0\). However the RHS has no series expansion at \(x=0\) (not analytic there). Therefore we must use Frobenius series in this case.  Let \begin {align*} y & =\sum _{n=0}^{\infty }a_{n}x^{n+r}\\ y^{\prime } & =\sum _{n=0}^{\infty }\left ( n+r\right ) a_{n}x^{n+r-1} \end {align*}

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

Reindex so all powers on \(x\) are the lowest gives\begin {equation} \sum _{n=0}^{\infty }\left ( n+r\right ) a_{n}x^{n+r-1}+\sum _{n=2}^{\infty }2a_{n-2}x^{n+r-1}=0 \tag {1} \end {equation} For \(n=0\,\), Eq(1) gives\[ ra_{0}x^{r-1}=0 \] Hence \(r=0\) since \(a_{0}\neq 0\). Therefore the balance equation is\[ mc_{0}x^{m-1}=\sqrt {x}\] Where \(r\) is replaced my \(m\) and \(a_{n}\) is replaced by \(c_{n}\). The above will used below to find \(y_{p}\). For \(n=1\), Eq(1) gives\begin {align*} \left ( 1+r\right ) a_{1}x^{r} & =0\\ a_{1} & =0 \end {align*}

For \(n\geq 2\) the recurrence relation is from (1)\begin {align} \left ( n+r\right ) a_{n}+2a_{n-2} & =0\nonumber \\ a_{n} & =-\frac {2a_{n-2}}{\left ( n+r\right ) } \tag {2} \end {align}

Or for \(r=0\) the above simplifies to \begin {equation} a_{n}=-\frac {2}{n}a_{n-2} \tag {2A} \end {equation} Eq (2A) is what is used to find all \(a_{n}\) for For \(n\geq 2\). Hence for \(n=2\) and remembering that \(a_{0}=1\) gives\[ a_{2}=-1 \] For \(n=3\)\[ a_{3}=-\frac {2}{3}a_{1}=0 \] For \(n=4\)\[ a_{4}=-\frac {1}{2}a_{2}=\frac {1}{2}\] For \(n=5,7,\cdots \) and all odd \(n\) then \(a_{n}=0\). For \(n=6\)\[ a_{6}=-\frac {1}{3}a_{4}=-\frac {1}{6}\] And so on. Hence (using \(a_{0}=1\))\begin {align*} y_{h} & =c_{1}\sum _{n=0}^{\infty }a_{n}x^{n+r}\\ & =c_{1}\sum _{n=0}^{\infty }a_{n}x^{n}\\ & =c_{1}\left ( a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+\cdots \right ) \\ & =c_{1}\left ( 1-x^{2}+\frac {1}{2}x^{4}-\frac {1}{6}x^{6}+\cdots \right ) \end {align*}

Now we need to find \(y_{p}\) using the balance equation. From above we found that\[ ra_{0}x^{r-1}=x^{\frac {1}{2}}\] Renaming \(a\) to \(c\) and \(r\) as \(m\) so not to confuse terms used for \(y_{h}\), the above becomes\[ mc_{0}x^{m-1}=x^{\frac {1}{2}}\] Hence \(m-1=\frac {1}{2}\) or \(m=\frac {3}{2}\). Therefore \(mc_{0}=1\) or \(c_{0}=\frac {2}{3}\). Now we can find the series for \(y_{p}\) using\begin {align*} y_{p} & =\sum _{n=0}^{\infty }c_{n}x^{n+m}\\ & =x^{\frac {3}{2}}\sum _{n=0}^{\infty }c_{n}x^{n} \end {align*}

To find \(c_{m}\) we use the same recurrence relation found for \(y_{h}\) but change \(r\) to \(m\) and \(a\) to \(c\). From above we found \[ \left ( n+r\right ) a_{n}+2a_{n-2}=0 \] Hence it becomes\[ \left ( n+m\right ) c_{n}+2c_{n-2}=0 \] The above is valid for \(n\geq 2\). For \(n=0\) we have found \(c_{0}\) already. For \(c_{1}\) using the above \(ra_{1}=0\) hence it becomes \(mc_{1}=0\) which implies \[ c_{1}=0 \] since \(m\neq 0\). Now we are ready to find few \(c_{n}\) terms. The above recurrence relation becomes for \(m=\frac {3}{2}\)\begin {align*} \left ( n+\frac {3}{2}\right ) c_{n}+2c_{n-2} & =0\\ c_{n} & =\frac {-2c_{n-2}}{\left ( n+\frac {3}{2}\right ) } \end {align*}

Hence for \(n=2\)\[ c_{2}=\frac {-2c_{0}}{\left ( 2+\frac {3}{2}\right ) }=\frac {-2\left ( \frac {2}{3}\right ) }{\left ( 2+\frac {3}{2}\right ) }=-\frac {8}{21}\] For \(n=3\)\[ c_{3}=\frac {-2c_{1}}{\left ( 3+\frac {3}{2}\right ) }=0 \] For \(n=4\)\[ c_{4}=\frac {-2c_{2}}{\left ( 4+\frac {3}{2}\right ) }=\frac {-2\left ( -\frac {8}{21}\right ) }{\left ( 4+\frac {3}{2}\right ) }=\frac {32}{231}\] And so on. Hence\begin {align*} y_{p} & =x^{\frac {3}{2}}\sum _{n=0}^{\infty }c_{n}x^{n}\\ & =x^{\frac {3}{2}}\left ( c_{0}+c_{1}x+c_{2}x^{2}+\cdots \right ) \end {align*}

Hence the final solution is \begin {align*} y & =y_{h}+y_{p}\\ & =c_{1}\left ( 1-x^{2}+\frac {1}{2}x^{4}-\frac {1}{6}x^{6}+\cdots \right ) +x^{\frac {3}{2}}\left ( \frac {2}{3}+-\frac {8}{21}x^{2}+\frac {32}{231}x^{4}-\cdots \right ) \end {align*}