1.1 problem 1. Using series method

1.1.1 Existence and uniqueness analysis
1.1.2 Solving as series ode
1.1.3 Maple step by step solution

Internal problem ID [6544]
Internal file name [OUTPUT/5792_Sunday_June_05_2022_03_54_44_PM_12664182/index.tex]

Book: A course in Ordinary Differential Equations. by Stephen A. Wirkus, Randall J. Swift. CRC Press NY. 2015. 2nd Edition
Section: Chapter 8. Series Methods. section 8.2. The Power Series Method. Problems Page 603
Problem number: 1. Using series method.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati", "first order ode series method. Taylor series method"

Maple gives the following as the ode type

[[_Riccati, _special]]

\[ \boxed {y^{\prime }-y^{2}=-x} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}

With the expansion point for the power series method at \(x = 0\).

1.1.1 Existence and uniqueness analysis

This is non linear first order ODE. In canonical form it is written as \begin {align*} y^{\prime } &= f(x,y)\\ &= y^{2}-x \end {align*}

The \(x\) domain of \(f(x,y)\) when \(y=1\) is \[ \{-\infty

The \(y\) domain of \(\frac {\partial f}{\partial y}\) when \(x=0\) is \[ \{-\infty

1.1.2 Solving as series ode

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 &= -x +y^{2}\\ F_1 &= \frac {d F_0}{dx} \\ &= \frac {\partial F_0}{\partial x}+ \frac {\partial F_0}{\partial y} F_0 \\ &= 2 y^{3}-2 y x -1\\ F_2 &= \frac {d F_1}{dx} \\ &= \frac {\partial F_1}{\partial x}+ \frac {\partial F_1}{\partial y} F_1 \\ &= 6 y^{4}-8 y^{2} x +2 x^{2}-2 y\\ F_3 &= \frac {d F_2}{dx} \\ &= \frac {\partial F_2}{\partial x}+ \frac {\partial F_2}{\partial y} F_2 \\ &= 24 y^{5}-40 y^{3} x +16 y x^{2}-10 y^{2}+6 x\\ F_4 &= \frac {d F_3}{dx} \\ &= \frac {\partial F_3}{\partial x}+ \frac {\partial F_3}{\partial y} F_3 \\ &= 120 y^{6}-240 y^{4} x +136 x^{2} y^{2}-60 y^{3}-16 x^{3}+52 y x +6\\ F_5 &= \frac {d F_4}{dx} \\ &= \frac {\partial F_4}{\partial x}+ \frac {\partial F_4}{\partial y} F_4 \\ &= 720 y^{7}-1680 y^{5} x -420 y^{4}+1232 x^{2} y^{3}+504 y^{2} x +\left (-272 x^{3}+52\right ) y-100 x^{2}\\ F_6 &= \frac {d F_5}{dx} \\ &= \frac {\partial F_5}{\partial x}+ \frac {\partial F_5}{\partial y} F_5 \\ &= 5040 y^{8}-13440 y^{6} x -3360 y^{5}+12096 y^{4} x^{2}+5152 y^{3} x +\left (-3968 x^{3}+556\right ) y^{2}-1824 y x^{2}+272 x^{4}-252 x \end {align*}

And so on. Evaluating all the above at initial conditions \(x \left (0\right ) = 0\) and \(y \left (0\right ) = 1\) gives \begin {align*} F_0 &= 1\\ F_1 &= 1\\ F_2 &= 4\\ F_3 &= 14\\ F_4 &= 66\\ F_5 &= 352\\ F_6 &= 2236 \end {align*}

Substituting all the above in (6) and simplifying gives the solution as \[ y = \frac {x^{2}}{2}+x +1+\frac {2 x^{3}}{3}+\frac {7 x^{4}}{12}+\frac {11 x^{5}}{20}+\frac {22 x^{6}}{45}+\frac {559 x^{7}}{1260}+O\left (x^{8}\right ) \] Now we substitute the given initial conditions in the above to solve for \(y \left (0\right )\). Solving for \(y \left (0\right )\) from initial conditions gives \begin {align*} y \left (0\right ) = y \left (0\right ) \end {align*}

Therefore the solution becomes \begin {align*} y = \frac {1}{2} x^{2}+x +1+\frac {2}{3} x^{3}+\frac {7}{12} x^{4}+\frac {11}{20} x^{5}+\frac {22}{45} x^{6}+\frac {559}{1260} x^{7} \end {align*}

Hence the solution can be written as \begin {gather*} y = \frac {x^{2}}{2}+x +1+\frac {2 x^{3}}{3}+\frac {7 x^{4}}{12}+\frac {11 x^{5}}{20}+\frac {22 x^{6}}{45}+\frac {559 x^{7}}{1260}+O\left (x^{8}\right ) \end {gather*} which simplifies to \begin {gather*} y = \frac {x^{2}}{2}+x +1+\frac {2 x^{3}}{3}+\frac {7 x^{4}}{12}+\frac {11 x^{5}}{20}+\frac {22 x^{6}}{45}+\frac {559 x^{7}}{1260}+O\left (x^{8}\right ) \end {gather*} Unable to also solve using normal power series since not linear ode. Not currently supported.

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {x^{2}}{2}+x +1+\frac {2 x^{3}}{3}+\frac {7 x^{4}}{12}+\frac {11 x^{5}}{20}+\frac {22 x^{6}}{45}+\frac {559 x^{7}}{1260}+O\left (x^{8}\right ) \\ \end{align*}

Verification of solutions

\[ y = \frac {x^{2}}{2}+x +1+\frac {2 x^{3}}{3}+\frac {7 x^{4}}{12}+\frac {11 x^{5}}{20}+\frac {22 x^{6}}{45}+\frac {559 x^{7}}{1260}+O\left (x^{8}\right ) \] Verified OK.

1.1.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }=-x +y^{2}, y \left (0\right )=1\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=-x +y^{2} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=1 \\ {} & {} & 0 \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} 0 \\ {} & {} & 0=0 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} 0=0\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & 0 \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & 0 \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati Special 
<- Riccati Special successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 24

Order:=8; 
dsolve([diff(y(x),x)=y(x)^2-x,y(0) = 1],y(x),type='series',x=0);
 

\[ y \left (x \right ) = 1+x +\frac {1}{2} x^{2}+\frac {2}{3} x^{3}+\frac {7}{12} x^{4}+\frac {11}{20} x^{5}+\frac {22}{45} x^{6}+\frac {559}{1260} x^{7}+\operatorname {O}\left (x^{8}\right ) \]

Solution by Mathematica

Time used: 0.015 (sec). Leaf size: 48

AsymptoticDSolveValue[{y'[x]==y[x]^2-x,{y[0]==1}},y[x],{x,0,7}]
 

\[ y(x)\to \frac {559 x^7}{1260}+\frac {22 x^6}{45}+\frac {11 x^5}{20}+\frac {7 x^4}{12}+\frac {2 x^3}{3}+\frac {x^2}{2}+x+1 \]