Internal problem ID [5031]
Internal file name [OUTPUT/4524_Sunday_June_05_2022_03_00_10_PM_3396783/index.tex
]
Book: Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston.
Pearson 2018.
Section: Chapter 8, Series solutions of differential equations. Section 8.4. page 449
Problem number: 13.
ODE order: 1.
ODE degree: 1.
The type(s) of ODE detected by this program : "exact", "linear", "separable", "homogeneousTypeD2", "first_order_ode_lie_symmetry_lookup", "first order ode series method. Ordinary point", "first order ode series method. Taylor series method"
Maple gives the following as the ode type
[_separable]
\[ \boxed {x^{\prime }+\sin \left (t \right ) x=0} \] With initial conditions \begin {align*} [x \left (0\right ) = 1] \end {align*}
With the expansion point for the power series method at \(t = 0\).
This is a linear ODE. In canonical form it is written as \begin {align*} x^{\prime } + p(t)x &= q(t) \end {align*}
Where here \begin {align*} p(t) &=\sin \left (t \right )\\ q(t) &=0 \end {align*}
Hence the ode is \begin {align*} x^{\prime }+\sin \left (t \right ) x = 0 \end {align*}
The domain of \(p(t)=\sin \left (t \right )\) is \[
\{-\infty
Solving ode using Taylor series method. This gives review on how the Taylor series method
works for solving first order ode. Let \[ y^{\prime }=f\left ( x,y\right ) \] Where \(f\left ( x,y\right ) \) is analytic at expansion point \(x_{0}\). We can always
shift to \(x_{0}=0\) if \(x_{0}\) is not zero. So from now we assume \(x_{0}=0\,\). Assume also that \(y\left ( x_{0}\right ) =y_{0}\). Using Taylor
series\begin {align*} y\left ( x\right ) & =y\left ( x_{0}\right ) +\left ( x-x_{0}\right ) y^{\prime }\left ( x_{0}\right ) +\frac {\left ( x-x_{0}\right ) ^{2}}{2}y^{\prime \prime }\left ( x_{0}\right ) +\frac {\left ( x-x_{0}\right ) ^{3}}{3!}y^{\prime \prime }\left ( x_{0}\right ) +\cdots \\ & =y_{0}+xf+\frac {x^{2}}{2}\left . \frac {df}{dx}\right \vert _{x_{0},y_{0}}+\frac {x^{3}}{3!}\left . \frac {d^{2}f}{dx^{2}}\right \vert _{x_{0},y_{0}}+\cdots \\ & =y_{0}+\sum _{n=0}^{\infty }\frac {x^{n+1}}{\left ( n+1\right ) !}\left . \frac {d^{n}f}{dx^{n}}\right \vert _{x_{0},y_{0}} \end {align*}
But \begin {align} \frac {df}{dx} & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}f\tag {1}\\ \frac {d^{2}f}{dx^{2}} & =\frac {d}{dx}\left ( \frac {df}{dx}\right ) \nonumber \\ & =\frac {\partial }{\partial x}\left ( \frac {df}{dx}\right ) +\frac {\partial }{\partial y}\left ( \frac {df}{dx}\right ) f\tag {2}\\ \frac {d^{3}f}{dx^{3}} & =\frac {d}{dx}\left ( \frac {d^{2}f}{dx^{2}}\right ) \nonumber \\ & =\frac {\partial }{\partial x}\left ( \frac {d^{2}f}{dx^{2}}\right ) +\left ( \frac {\partial }{\partial y}\frac {d^{2}f}{dx^{2}}\right ) f\tag {3}\\ & \vdots \nonumber \end {align}
And so on. Hence if we name \(F_{0}=f\left ( x,y\right ) \) then the above can be written as \begin {align} F_{0} & =f\left ( x,y\right ) \tag {4}\\ F_{n} & =\frac {d}{dx}\left ( F_{n-1}\right ) \nonumber \\ & =\frac {\partial }{\partial x}F_{n-1}+\left ( \frac {\partial F_{n-1}}{\partial y}\right ) F_{0} \tag {5} \end {align}
For example, for \(n=1\,\) we see that \begin {align*} F_{1} & =\frac {d}{dx}\left ( F_{0}\right ) \\ & =\frac {\partial }{\partial x}F_{0}+\left ( \frac {\partial F_{0}}{\partial y}\right ) F_{0}\\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}f \end {align*}
Which is (1). And when \(n=2\)\begin {align*} F_{2} & =\frac {d}{dx}\left ( F_{1}\right ) \\ & =\frac {\partial }{\partial x}F_{1}+\left ( \frac {\partial F_{1}}{\partial y}\right ) F_{0}\\ & =\frac {\partial }{\partial x}\left ( \frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}f\right ) +\frac {\partial }{\partial y}\left ( \frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}f\right ) f\\ & =\frac {\partial }{\partial x}\left ( \frac {df}{dx}\right ) +\frac {\partial }{\partial y}\left ( \frac {df}{dx}\right ) f \end {align*}
Which is (2) and so on. Therefore (4,5) can be used from now on along with \begin {equation} y\left ( x\right ) =y_{0}+\sum _{n=0}^{\infty }\frac {x^{n+1}}{\left ( n+1\right ) !}\left . F_{n}\right \vert _{x_{0},y_{0}} \tag {6} \end {equation} Hence
\begin {align*} F_0 &= -\sin \left (t \right ) x\\ F_1 &= \frac {d F_0}{dt} \\ &= \frac {\partial F_0}{\partial t}+ \frac {\partial F_0}{\partial x} F_0 \\ &= x \left (-\cos \left (t \right )+\sin \left (t \right )^{2}\right )\\ F_2 &= \frac {d F_1}{dt} \\ &= \frac {\partial F_1}{\partial t}+ \frac {\partial F_1}{\partial x} F_1 \\ &= \sin \left (t \right ) \cos \left (t \right ) \left (\cos \left (t \right )+3\right ) x\\ F_3 &= \frac {d F_2}{dt} \\ &= \frac {\partial F_2}{\partial t}+ \frac {\partial F_2}{\partial x} F_2 \\ &= \left (\cos \left (t \right )^{4}+6 \cos \left (t \right )^{3}+5 \cos \left (t \right )^{2}-5 \cos \left (t \right )-3\right ) x\\ F_4 &= \frac {d F_3}{dt} \\ &= \frac {\partial F_3}{\partial t}+ \frac {\partial F_3}{\partial x} F_3 \\ &= \sin \left (t \right ) x \left (-\cos \left (t \right )^{4}-10 \cos \left (t \right )^{3}-23 \cos \left (t \right )^{2}-5 \cos \left (t \right )+8\right ) \end {align*}
And so on. Evaluating all the above at initial conditions \(t \left (0\right ) = 0\) and \(x \left (0\right ) = 1\) gives \begin {align*} F_0 &= 0\\ F_1 &= -1\\ F_2 &= 0\\ F_3 &= 4\\ F_4 &= 0 \end {align*}
Substituting all the above in (6) and simplifying gives the solution as \[
x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right )
\] Now we substitute the
given initial conditions in the above to solve for \(x \left (0\right )\). Solving for \(x \left (0\right )\) from initial conditions gives
\begin {align*} x \left (0\right ) = x \left (0\right ) \end {align*}
Therefore the solution becomes \begin {align*} x = -\frac {1}{2} t^{2}+1+\frac {1}{6} t^{4} \end {align*}
Hence the solution can be written as \begin {gather*} x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right ) \end {gather*} which simplifies to \begin {gather*} x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right ) \end {gather*} Since \(t = 0\) is also an ordinary point,
then standard power series can also be used. Writing the ODE as \begin {align*} x^{\prime } + q(t)x &= p(t) \\ x^{\prime }+\sin \left (t \right ) x &= 0 \end {align*}
Where \begin {align*} q(t) &= \sin \left (t \right )\\ p(t) &= 0 \end {align*}
Next, the type of the expansion point \(t = 0\) is determined. This point can be an ordinary point, a
regular singular point (also called removable singularity), or irregular singular point (also
called non-removable singularity or essential singularity). When \(t = 0\) is an ordinary point, then
the standard power series is used. If the point is a regular singular point, Frobenius series is
used instead. Irregular singular point requires more advanced methods (asymptotic methods)
and is not supported now. Hopefully this will be added in the future. \(t = 0\) is called an ordinary
point \(q(t)\) has a Taylor series expansion around the point \(t = 0\). \(t = 0\) is called a regular singular point if \(q(t)\) is
not not analytic at \(t = 0\) but \(t q(t)\) has Taylor series expansion. And finally, \(t = 0\) is an irregular
singular point if the point is not ordinary and not regular singular. This is the most
complicated case. Now the expansion point \(t = 0\) is checked to see if it is an ordinary
point or not. Let the solution be represented as power series of the form \[ x = \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n} \] Then
\begin {align*} x^{\prime } &= \moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1} \end {align*}
Substituting the above back into the ode gives \begin {align*} \left (\moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1}\right )+\sin \left (t \right ) \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right ) = 0\tag {1} \end {align*}
Expanding \(\sin \left (t \right )\) as Taylor series around \(t=0\) and keeping only the first \(6\) terms gives \begin {align*} \sin \left (t \right ) &= t -\frac {1}{6} t^{3}+\frac {1}{120} t^{5}-\frac {1}{5040} t^{7} + \dots \\ &= t -\frac {1}{6} t^{3}+\frac {1}{120} t^{5}-\frac {1}{5040} t^{7} \end {align*}
Hence the ODE in Eq (1) becomes \[ \left (\moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1}\right )+\left (t -\frac {1}{6} t^{3}+\frac {1}{120} t^{5}-\frac {1}{5040} t^{7}\right ) \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right ) = 0\tag {1} \] Expanding the second term in (1) gives \[ \left (\moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1}\right )+t \eslowast \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right )-\frac {t^{3}}{6}\eslowast \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right )+\frac {t^{5}}{120}\eslowast \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right )-\frac {t^{7}}{5040}\eslowast \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right ) = 0\tag {1} \] Which simplifies
to \begin{equation}
\tag{2} \left (\moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}t^{1+n} a_{n}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {t^{n +3} a_{n}}{6}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {t^{n +5} a_{n}}{120}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {t^{n +7} a_{n}}{5040}\right ) = 0
\end{equation} The next step is to make all powers of \(t\) be \(n\) in each summation term. Going over each
summation term above with power of \(t\) in it which is not already \(t^{n}\) and adjusting the power
and the corresponding index gives \begin{align*}
\moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1} &= \moverset {\infty }{\munderset {n =0}{\sum }}\left (1+n \right ) a_{1+n} t^{n} \\
\moverset {\infty }{\munderset {n =0}{\sum }}t^{1+n} a_{n} &= \moverset {\infty }{\munderset {n =1}{\sum }}a_{n -1} t^{n} \\
\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {t^{n +3} a_{n}}{6}\right ) &= \moverset {\infty }{\munderset {n =3}{\sum }}\left (-\frac {a_{n -3} t^{n}}{6}\right ) \\
\moverset {\infty }{\munderset {n =0}{\sum }}\frac {t^{n +5} a_{n}}{120} &= \moverset {\infty }{\munderset {n =5}{\sum }}\frac {a_{n -5} t^{n}}{120} \\
\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {t^{n +7} a_{n}}{5040}\right ) &= \moverset {\infty }{\munderset {n =7}{\sum }}\left (-\frac {a_{n -7} t^{n}}{5040}\right ) \\
\end{align*} Substituting all the above in Eq (2) gives the
following equation where now all powers of \(t\) are the same and equal to \(n\). \begin{equation}
\tag{3} \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (1+n \right ) a_{1+n} t^{n}\right )+\left (\moverset {\infty }{\munderset {n =1}{\sum }}a_{n -1} t^{n}\right )+\moverset {\infty }{\munderset {n =3}{\sum }}\left (-\frac {a_{n -3} t^{n}}{6}\right )+\left (\moverset {\infty }{\munderset {n =5}{\sum }}\frac {a_{n -5} t^{n}}{120}\right )+\moverset {\infty }{\munderset {n =7}{\sum }}\left (-\frac {a_{n -7} t^{n}}{5040}\right ) = 0
\end{equation} \(n=1\) gives
\begin {align*} 2 a_{2}+a_{0}&=0 \end {align*}
Which after substituting earlier equations, simplifies to \[ a_{2} = -\frac {a_{0}}{2} \] \(n=2\) gives \begin {align*} 3 a_{3}+a_{1}&=0 \end {align*}
Which after substituting earlier equations, simplifies to \begin {align*} 3 a_{3} = 0 \end {align*}
Or \begin {align*} a_{3} = 0 \end {align*}
\(n=3\) gives \begin {align*} 4 a_{4}+a_{2}-\frac {a_{0}}{6}&=0 \end {align*}
Which after substituting earlier equations, simplifies to \[ a_{4} = \frac {a_{0}}{6} \] \(n=4\) gives \begin {align*} 5 a_{5}+a_{3}-\frac {a_{1}}{6}&=0 \end {align*}
Which after substituting earlier equations, simplifies to \begin {align*} 5 a_{5} = 0 \end {align*}
Or \begin {align*} a_{5} = 0 \end {align*}
\(n=5\) gives \begin {align*} 6 a_{6}+a_{4}-\frac {a_{2}}{6}+\frac {a_{0}}{120}&=0 \end {align*}
Which after substituting earlier equations, simplifies to \[ a_{6} = -\frac {31 a_{0}}{720} \] For \(7\le n\), the recurrence equation is \begin{equation}
\tag{4} \left (1+n \right ) a_{1+n}+a_{n -1}-\frac {a_{n -3}}{6}+\frac {a_{n -5}}{120}-\frac {a_{n -7}}{5040} = 0
\end{equation}
Solving for \(a_{1+n}\), gives \begin{equation}
\tag{5} a_{1+n} = \frac {-5040 a_{n -1}+840 a_{n -3}-42 a_{n -5}+a_{n -7}}{5040+5040 n}
\end{equation} And so on. Therefore the solution is \begin {align*} x &= \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\\ &= a_{3} t^{3}+a_{2} t^{2}+a_{1} t +a_{0} + \dots \end {align*}
Substituting the values for \(a_{n}\) found above, the solution becomes \[
x = a_{0}-\frac {1}{2} a_{0} t^{2}+\frac {1}{6} a_{0} t^{4}+\dots
\] Collecting terms, the solution
becomes \begin{equation}
\tag{3} x = \left (-\frac {1}{2} t^{2}+1+\frac {1}{6} t^{4}\right ) a_{0}+O\left (t^{6}\right )
\end{equation} At \(t = 0\) the solution above becomes \[ x(0) = a_{0} \] Therefore the solution in Eq(3) now can be
written as \[
x = \left (-\frac {1}{2} t^{2}+1+\frac {1}{6} t^{4}\right ) x \left (0\right )+O\left (t^{6}\right )
\] Now we substitute the given initial conditions in the above to solve for \(x \left (0\right )\). Solving
for \(x \left (0\right )\) from initial conditions gives \begin {align*} x \left (0\right ) = 1 \end {align*}
Therefore the solution becomes \begin {align*} x = -\frac {1}{2} t^{2}+1+\frac {1}{6} t^{4} \end {align*}
Hence the solution can be written as \begin {gather*} x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right ) \end {gather*} which simplifies to \begin {gather*} x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right ) \end {gather*}
The solution(s) found are the following \begin{align*}
\tag{1} x &= -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right ) \\
\tag{2} x &= -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right ) \\
\end{align*} Verification of solutions
\[
x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right )
\] Verified OK.
\[
x = -\frac {t^{2}}{2}+1+\frac {t^{4}}{6}+O\left (t^{6}\right )
\] Verified OK.
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [x^{\prime }+\sin \left (t \right ) x=0, x \left (0\right )=1\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & x^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & x^{\prime }=-\sin \left (t \right ) x \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {x^{\prime }}{x}=-\sin \left (t \right ) \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {x^{\prime }}{x}d t =\int -\sin \left (t \right )d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (x\right )=\cos \left (t \right )+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \\ {} & {} & x={\mathrm e}^{\cos \left (t \right )+c_{1}} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} x \left (0\right )=1 \\ {} & {} & 1={\mathrm e}^{1+c_{1}} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =-1 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =-1\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & x={\mathrm e}^{\cos \left (t \right )-1} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & x={\mathrm e}^{\cos \left (t \right )-1} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.0 (sec). Leaf size: 14
\[
x \left (t \right ) = 1-\frac {1}{2} t^{2}+\frac {1}{6} t^{4}+\operatorname {O}\left (t^{6}\right )
\]
✓ Solution by Mathematica
Time used: 0.001 (sec). Leaf size: 19
\[
x(t)\to \frac {t^4}{6}-\frac {t^2}{2}+1
\]
6.13.2 Solving as series ode
6.13.3 Maple step by step solution
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful`
Order:=6;
dsolve([diff(x(t),t)+sin(t)*x(t)=0,x(0) = 1],x(t),type='series',t=0);
AsymptoticDSolveValue[{x'[t]+Sin[t]*x[t]==0,{x[0]==1}},x[t],{t,0,5}]