1.3.5 Example 5. \(xy^{\prime }+y=\sin x\)
\begin{equation} xy^{\prime }+y=\sin x \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 will use the balance equation, EQ (*) found in the first example
when finding
\(y_{h}\). We just need to rename
\(a_{0}\) to
\(c_{0}\) and add the
\(x\) on the right side of the balance
equation.
\begin{align*} \left ( r+1\right ) c_{0}x^{r} & =\sin x\\ & =x-\frac {1}{6}x^{3}+\frac {1}{120}x^{5}-\frac {1}{5040}x^{7}+\cdots \end{align*}
For each term on the right side, there is different balance equation. Hence we
have
\begin{align} \left ( r+1\right ) c_{0}x^{r} & =x\tag {2}\\ \left ( r+1\right ) c_{0}x^{r} & =-\frac {1}{6}x^{3}\tag {3}\\ \left ( r+1\right ) c_{0}x^{r} & =\frac {1}{120}x^{5}\tag {4}\\ \left ( r+1\right ) c_{0}x^{r} & =-\frac {1}{5040}x^{7}\tag {5}\\ & \vdots \nonumber \end{align}
Each one equation above, gives different \(y_{p}\) then at the end we will add them all. Starting
with (2)
\[ \left ( r+1\right ) c_{0}x^{r}=x \]
Hence
\(r=1\) the therefore
\(\left ( r+1\right ) c_{0}=1\) or
\(c_{0}=\frac {1}{2}\). Now, since the summation equation have all the sums in
it start at the same lower index, then we know there is only one term. Hence the first
particular solution is
\(y_{p_{1}}=c_{0}x^{r}=\frac {1}{2}x\). Now we will look at the next term on the right side, which is (3)
and do the same.
\[ \left ( r+1\right ) c_{0}x^{r}=-\frac {1}{6}x^{3}\]
Then
\(r=3\) and
\(\left ( r+1\right ) c_{0}=-\frac {1}{6}\) or
\(4c_{0}=-\frac {1}{6}\) or
\(c_{0}=\frac {-1}{24}\). Then the second particular solution is
\(y_{p_{2}}=\frac {-1}{24}x^{3}\). Now we will
look at the next term in (4) and do the same
\[ \left ( r+1\right ) c_{0}x^{r}=\frac {1}{120}x^{5}\]
Hence
\(r=5\) the therefore
\(\left ( r+1\right ) c_{0}=\frac {1}{120}\) or
\(6c_{0}=\frac {1}{120}\) or
\(c_{0}=\frac {1}{720}\). Hence the first
particular solution is
\(y_{p_{3}}=\frac {1}{720}x^{5}\). Now we will look at (5)
\[ \left ( r+1\right ) c_{0}x^{r}=-\frac {1}{5040}x^{7}\]
Hence
\(r=7\) the therefore
\(\left ( r+1\right ) c_{0}=-\frac {1}{5040}\) or
\(8c_{0}=-\frac {1}{5040}\) or
\(c_{0}=-\frac {1}{40320}\).
Hence the first particular solution is
\(y_{p_{3}}=-\frac {1}{40320}x^{7}\) and so on. Hence
\[ y_{p}=\frac {1}{2}x-\frac {1}{24}x^{3}+\frac {1}{720}x^{5}-\frac {1}{5040}x^{7}+\cdots \]
We found
\(y_{p}\). The solution
is
\begin{align*} y & =y_{h}+y_{p}\\ & =\frac {a_{0}}{x}+\left ( \frac {1}{2}x-\frac {1}{24}x^{3}+\frac {1}{720}x^{5}-\frac {1}{5040}x^{7}+\cdots \right ) \end{align*}
Notice here we also used that fact that since all sum term in the summation equation in
the first example have same starting index, then we know that all \(c_{n}=0\) for \(n>0\) for each \(y_{p}\) we found
above, so we only needed to find \(c_{0}\) only for each \(y_{p}\).