2.5.8 problem 8
Internal
problem
ID
[8645]
Book
:
Own
collection
of
miscellaneous
problems
Section
:
section
5.0
Problem
number
:
8
Date
solved
:
Tuesday, December 17, 2024 at 12:56:47 PM
CAS
classification
:
[[_linear, `class A`]]
Solve
\begin{align*} y^{\prime }+y&=\frac {1}{x^{2}} \end{align*}
Using series expansion around \(x=0\)
Since this is an inhomogeneous, then let the solution be
\[ y = y_h + y_p \]
Where \(y_h\) is the solution to the
homogeneous ode \(y^{\prime }+y = 0\),and \(y_p\) is a particular solution to the inhomogeneous ode. First, we solve
for \(y_h\) Let the solution be represented as Frobenius power series of the form
\[ y = \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r} \]
Then
\begin{align*} y^{\prime } &= \moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) a_{n} x^{n +r -1} \end{align*}
Substituting the above back into the ode gives
\begin{align*} \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) a_{n} x^{n +r -1}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r}\right ) = 0\tag {1} \end{align*}
Which simplifies to
\begin{equation}
\tag{2A} \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) a_{n} x^{n +r -1}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r}\right ) = 0
\end{equation}
The next step is to make all powers of \(x\) be \(n +r -1\) in each summation term.
Going over each summation term above with power of \(x\) in it which is not already \(x^{n +r -1}\) and
adjusting the power and the corresponding index gives
\begin{align*}
\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r} &= \moverset {\infty }{\munderset {n =1}{\sum }}a_{n -1} x^{n +r -1} \\
\end{align*}
Substituting all the above in Eq (2A)
gives the following equation where now all powers of \(x\) are the same and equal to \(n +r -1\).
\begin{equation}
\tag{2B} \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) a_{n} x^{n +r -1}\right )+\left (\moverset {\infty }{\munderset {n =1}{\sum }}a_{n -1} x^{n +r -1}\right ) = 0
\end{equation}
The
indicial equation is obtained from \(n=0\). From Eq (2) this gives
\[ \left (n +r \right ) a_{n} x^{n +r -1} = 0 \]
When \(n=0\) the above becomes
\[ r a_{0} x^{-1+r} = 0 \]
The
corresponding balance equation is found by replacing \(r\) by \(m\) and \(a\) by \(c\) to avoid confusing terms
between particular solution and the homogeneous solution. Hence the balance equation is
\begin{align*}m c_{0} x^{-1+m} = \frac {1}{x^{2}} \end{align*}
This equation will used later to find the particular solution.
Since \(a_{0}\neq 0\) then the indicial equation becomes
\[ r \,x^{-1+r} = 0 \]
Since the above is true for all \(x\) then the
indicial equation simplifies to
\[ r = 0 \]
Solving for \(r\) gives the root of the indicial equation as
\[ r=0 \]
For \(1\le n\), the recurrence equation is
\begin{equation}
\tag{4} a_{n} \left (n +r \right )+a_{n -1} = 0
\end{equation}
For \(n = 1\) the recurrence equation gives
\[
a_{1} \left (1+r \right )+a_{0} = 0
\]
Which after substituting
the earlier terms found becomes
\[
a_{1} = -\frac {a_{0}}{1+r}
\]
For \(n = 2\) the recurrence equation gives
\[
a_{2} \left (2+r \right )+a_{1} = 0
\]
Which after substituting
the earlier terms found becomes
\[
a_{2} = \frac {a_{0}}{\left (1+r \right ) \left (2+r \right )}
\]
For \(n = 3\) the recurrence equation gives
\[
a_{3} \left (3+r \right )+a_{2} = 0
\]
Which after substituting
the earlier terms found becomes
\[
a_{3} = -\frac {a_{0}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right )}
\]
For \(n = 4\) the recurrence equation gives
\[
a_{4} \left (4+r \right )+a_{3} = 0
\]
Which after substituting
the earlier terms found becomes
\[
a_{4} = \frac {a_{0}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right )}
\]
For \(n = 5\) the recurrence equation gives
\[
a_{5} \left (5+r \right )+a_{4} = 0
\]
Which after
substituting the earlier terms found becomes
\[
a_{5} = -\frac {a_{0}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right ) \left (5+r \right )}
\]
And so on. Therefore the solution is
\begin{align*} y &= \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r}\\ &= a_{0} x^{r}+a_{1} x^{1+r}+a_{2} x^{2+r}+a_{3} x^{3+r} + \dots \end{align*}
Substituting the values for \(a_{n}\) found above, the solution becomes
\[
y = a_{0} x^{r}-\frac {a_{0} x^{1+r}}{1+r}+\frac {a_{0} x^{2+r}}{\left (1+r \right ) \left (2+r \right )}-\frac {a_{0} x^{3+r}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right )}+\frac {a_{0} x^{4+r}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right )}-\frac {a_{0} x^{5+r}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right ) \left (5+r \right )}+\dots
\]
Which can be written as
\[
y = x^{r} \left (a_{0}-\frac {a_{0} x}{1+r}+\frac {a_{0} x^{2}}{\left (1+r \right ) \left (2+r \right )}-\frac {a_{0} x^{3}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right )}+\frac {a_{0} x^{4}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right )}-\frac {a_{0} x^{5}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right ) \left (5+r \right )}+O\left (x^{6}\right ) a_{0}\right )
\]
Collecting terms, the solution becomes
\begin{align*} y = x^{r} \left (1-\frac {x}{1+r}+\frac {x^{2}}{\left (1+r \right ) \left (2+r \right )}-\frac {x^{3}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right )}+\frac {x^{4}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right )}-\frac {x^{5}}{\left (1+r \right ) \left (2+r \right ) \left (3+r \right ) \left (4+r \right ) \left (5+r \right )}+O\left (x^{6}\right )\right ) a_{0}\tag {3} \end{align*}
Finally, since \(r = 0\), then the solution becomes
\begin{gather*} y = \left (1-x +\frac {x^{2}}{2}-\frac {x^{3}}{6}+\frac {x^{4}}{24}-\frac {x^{5}}{120}+O\left (x^{6}\right )\right ) a_{0}\tag {3} \end{gather*}
Now we determine the particular solution \(y_p\) by
solving the balance equation
\[ m c_{0} x^{-1+m} = \frac {1}{x^{2}} \]
For \(c_{0}\) and \(x\). This results in
\begin{align*} c_{0}&=-1\\ m&=-1 \end{align*}
The particular solution is therefore
\begin{align*} y_p &= \sum _{n=0}^{\infty } c_n x^{n+m}\\ &= \sum _{n=0}^{\infty } c_n x^{n+-1} \end{align*}
Where in the above \(c_0 = -1\). The remaining \(c_n\) values are found using the same recurrence relation
used to find the homogeneous solution but using \(c_0\) in place of \(a_{0}\) and using \(m=-1\) in place
of the root of the indicial equation used to find the homogeneous solution. The
following are the values of \(a_n\) found in terms of the indicial root \(r\). These will be now
used to find find \(c_n\) by replacing \(a_{0} = -1\) and \(r=-1\). The following table gives the \(a_n\) values found
and the corresponding \(c_n\) values which will be used to find the particular solution
| | |
\(n\) |
\(a_n\) |
\(c_n\) |
| | |
\(0\) |
\(a_{0} = 1\) | \(c_{0} = -1\) |
| | |
Unable to find particular solution .Unable to find the particular solution. No solution
exist.
Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )+y \left (x \right )=\frac {1}{x^{2}} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-y \left (x \right )+\frac {1}{x^{2}} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (x \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )+y \left (x \right )=\frac {1}{x^{2}} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (\frac {d}{d x}y \left (x \right )+y \left (x \right )\right )=\frac {\mu \left (x \right )}{x^{2}} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (y \left (x \right ) \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (\frac {d}{d x}y \left (x \right )+y \left (x \right )\right )=\left (\frac {d}{d x}y \left (x \right )\right ) \mu \left (x \right )+y \left (x \right ) \left (\frac {d}{d x}\mu \left (x \right )\right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \frac {d}{d x}\mu \left (x \right ) \\ {} & {} & \frac {d}{d x}\mu \left (x \right )=\mu \left (x \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )={\mathrm e}^{x} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (y \left (x \right ) \mu \left (x \right )\right )\right )d x =\int \frac {\mu \left (x \right )}{x^{2}}d x +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \left (x \right ) \mu \left (x \right )=\int \frac {\mu \left (x \right )}{x^{2}}d x +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\frac {\int \frac {\mu \left (x \right )}{x^{2}}d x +\mathit {C1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )={\mathrm e}^{x} \\ {} & {} & y \left (x \right )=\frac {\int \frac {{\mathrm e}^{x}}{x^{2}}d x +\mathit {C1}}{{\mathrm e}^{x}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y \left (x \right )=\frac {-\frac {{\mathrm e}^{x}}{x}-\mathrm {Ei}_{1}\left (-x \right )+\mathit {C1}}{{\mathrm e}^{x}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (x \right )=\frac {\mathit {C1} x \,{\mathrm e}^{-x}-{\mathrm e}^{-x} \mathrm {Ei}_{1}\left (-x \right ) x -1}{x} \end {array} \]
Maple trace
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful`
Maple dsolve solution
Solving time : 0.036
(sec)
Leaf size : maple_leaf_size
dsolve(diff(y(x),x)+y(x) = 1/x^2,y(x),
series,x=0)
\[ \text {No solution found} \]
Mathematica DSolve solution
Solving time : 0.015
(sec)
Leaf size : 122
AsymptoticDSolveValue[{D[y[x],x]+y[x]==1/x^2,{}},
y[x],{x,0,5}]
\[
y(x)\to \left (-\frac {x^5}{120}+\frac {x^4}{24}-\frac {x^3}{6}+\frac {x^2}{2}-x+1\right ) \left (\frac {x^6}{2160}+\frac {x^5}{1800}+\frac {x^4}{480}+\frac {x^3}{72}+\frac {x^2}{12}+\frac {x}{2}-\frac {1}{x}+\log (x)\right )+c_1 \left (-\frac {x^5}{120}+\frac {x^4}{24}-\frac {x^3}{6}+\frac {x^2}{2}-x+1\right )
\]