1.5 problem 3. series method

1.5.1 Solving as series ode
1.5.2 Maple step by step solution

Internal problem ID [6548]
Internal file name [OUTPUT/5796_Sunday_June_05_2022_03_54_56_PM_99488822/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: 3. series method.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[`y=_G(x,y')`]

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

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

1.5.1 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 &= y+{\mathrm e}^{y} x\\ F_1 &= \frac {d F_0}{dx} \\ &= \frac {\partial F_0}{\partial x}+ \frac {\partial F_0}{\partial y} F_0 \\ &= {\mathrm e}^{2 y} x^{2}+\left (y x +x +1\right ) {\mathrm e}^{y}+y\\ F_2 &= \frac {d F_1}{dx} \\ &= \frac {\partial F_1}{\partial x}+ \frac {\partial F_1}{\partial y} F_1 \\ &= \left (3 y x^{2}+2 x^{2}+3 x \right ) {\mathrm e}^{2 y}+2 x^{3} {\mathrm e}^{3 y}+\left (y^{2} x +\left (2 x +2\right ) y+x +1\right ) {\mathrm e}^{y}+y\\ F_3 &= \frac {d F_2}{dx} \\ &= \frac {\partial F_2}{\partial x}+ \frac {\partial F_2}{\partial y} F_2 \\ &= \left (7 x^{2} y^{2}+\left (11 x^{2}+14 x \right ) y+3 x^{2}+7 x +3\right ) {\mathrm e}^{2 y}+\left (12 y x^{3}+7 x^{3}+12 x^{2}\right ) {\mathrm e}^{3 y}+6 x^{4} {\mathrm e}^{4 y}+\left (y^{3} x +\left (4 x +3\right ) y^{2}+\left (3 x +5\right ) y+x +1\right ) {\mathrm e}^{y}+y\\ F_4 &= \frac {d F_3}{dx} \\ &= \frac {\partial F_3}{\partial x}+ \frac {\partial F_3}{\partial y} F_3 \\ &= \left (15 x^{2} y^{3}+\left (43 x^{2}+45 x \right ) y^{2}+\left (28 x^{2}+61 x +20\right ) y+4 x^{2}+12 x +7\right ) {\mathrm e}^{2 y}+\left (50 x^{3} y^{2}+\left (69 x^{3}+100 x^{2}\right ) y+17 x^{3}+49 x^{2}+30 x \right ) {\mathrm e}^{3 y}+\left (60 y x^{4}+33 x^{4}+60 x^{3}\right ) {\mathrm e}^{4 y}+24 x^{5} {\mathrm e}^{5 y}+\left (y^{4} x +\left (7 x +4\right ) y^{3}+\left (11 x +15\right ) y^{2}+\left (4 x +9\right ) y+x +1\right ) {\mathrm e}^{y}+y\\ F_5 &= \frac {d F_4}{dx} \\ &= \frac {\partial F_4}{\partial x}+ \frac {\partial F_4}{\partial y} F_4 \\ &= \left (31 y^{4} x^{2}+\left (142 x^{2}+124 x \right ) y^{3}+\left (174 x^{2}+325 x +85\right ) y^{2}+\left (62 x^{2}+180 x +95\right ) y+5 x^{2}+18 x +12\right ) {\mathrm e}^{2 y}+\left (180 y^{3} x^{3}+\left (438 x^{3}+540 x^{2}\right ) y^{2}+\left (262 x^{3}+666 x^{2}+330 x \right ) y+36 x^{3}+136 x^{2}+132 x +30\right ) {\mathrm e}^{3 y}+\left (390 y^{2} x^{4}+\left (499 x^{4}+780 x^{3}\right ) y+120 x^{4}+379 x^{3}+270 x^{2}\right ) {\mathrm e}^{4 y}+\left (360 x^{5} y+192 x^{5}+360 x^{4}\right ) {\mathrm e}^{5 y}+120 x^{6} {\mathrm e}^{6 y}+\left (y^{5} x +\left (11 x +5\right ) y^{4}+\left (32 x +34\right ) y^{3}+\left (26 x +50\right ) y^{2}+\left (14+5 x \right ) y+x +1\right ) {\mathrm e}^{y}+y\\ F_6 &= \frac {d F_5}{dx} \\ &= \frac {\partial F_5}{\partial x}+ \frac {\partial F_5}{\partial y} F_5 \\ &= \left (63 y^{5} x^{2}+\left (424 x^{2}+315 x \right ) y^{4}+\left (850 x^{2}+1360 x +294\right ) y^{3}+\left (594 x^{2}+1510 x +685\right ) y^{2}+\left (129 x^{2}+454 x +299\right ) y+6 x^{2}+25 x +18\right ) {\mathrm e}^{2 y}+\left (602 y^{4} x^{3}+\left (2262 x^{3}+2408 x^{2}\right ) y^{3}+\left (2436 x^{3}+5414 x^{2}+2240 x \right ) y^{2}+\left (842 x^{3}+2870 x^{2}+2418 x +420\right ) y+72 x^{3}+324 x^{2}+391 x +132\right ) {\mathrm e}^{3 y}+\left (2100 y^{3} x^{4}+\left (4630 x^{4}+6300 x^{3}\right ) y^{2}+\left (2641 x^{4}+7370 x^{3}+4410 x^{2}\right ) y+370 x^{4}+1554 x^{3}+1863 x^{2}+630 x \right ) {\mathrm e}^{4 y}+\left (3360 y^{2} x^{5}+\left (4096 x^{5}+6720 x^{4}\right ) y+979 x^{5}+3256 x^{4}+2520 x^{3}\right ) {\mathrm e}^{5 y}+2520 \left (y x +\frac {11 x}{21}+1\right ) x^{5} {\mathrm e}^{6 y}+720 x^{7} {\mathrm e}^{7 y}+\left (y^{6} x +\left (6+16 x \right ) y^{5}+\left (76 x +65\right ) y^{4}+\left (122 x +184\right ) y^{3}+\left (57 x +140\right ) y^{2}+\left (6 x +20\right ) y+x +1\right ) {\mathrm e}^{y}+y \end {align*}

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

Substituting all the above in (6) and simplifying gives the solution as \[ y = \frac {x^{2}}{2}+\frac {x^{3}}{6}+\frac {x^{4}}{6}+\frac {x^{5}}{15}+\frac {43 x^{6}}{720}+\frac {151 x^{7}}{5040}+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}+\frac {1}{6} x^{3}+\frac {1}{6} x^{4}+\frac {1}{15} x^{5}+\frac {43}{720} x^{6}+\frac {151}{5040} x^{7} \end {align*}

Hence the solution can be written as \begin {gather*} y = \frac {x^{2}}{2}+\frac {x^{3}}{6}+\frac {x^{4}}{6}+\frac {x^{5}}{15}+\frac {43 x^{6}}{720}+\frac {151 x^{7}}{5040}+O\left (x^{8}\right ) \end {gather*} which simplifies to \begin {gather*} y = \frac {x^{2}}{2}+\frac {x^{3}}{6}+\frac {x^{4}}{6}+\frac {x^{5}}{15}+\frac {43 x^{6}}{720}+\frac {151 x^{7}}{5040}+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}+\frac {x^{3}}{6}+\frac {x^{4}}{6}+\frac {x^{5}}{15}+\frac {43 x^{6}}{720}+\frac {151 x^{7}}{5040}+O\left (x^{8}\right ) \\ \end{align*}

Verification of solutions

\[ y = \frac {x^{2}}{2}+\frac {x^{3}}{6}+\frac {x^{4}}{6}+\frac {x^{5}}{15}+\frac {43 x^{6}}{720}+\frac {151 x^{7}}{5040}+O\left (x^{8}\right ) \] Verified OK.

1.5.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }=y+{\mathrm e}^{y} x , y \left (0\right )=0\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 }=y+{\mathrm e}^{y} x \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=0 \\ {} & {} & 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 inverse_Riccati 
trying an equivalence to an Abel ODE 
differential order: 1; trying a linearization to 2nd order 
--- trying a change of variables {x -> y(x), y(x) -> x} 
differential order: 1; trying a linearization to 2nd order 
trying 1st order ODE linearizable_by_differentiation 
--- Trying Lie symmetry methods, 1st order --- 
`, `-> Computing symmetries using: way = 3 
`, `-> Computing symmetries using: way = 4 
`, `-> Computing symmetries using: way = 5 
trying symmetry patterns for 1st order ODEs 
-> trying a symmetry pattern of the form [F(x)*G(y), 0] 
-> trying a symmetry pattern of the form [0, F(x)*G(y)] 
-> trying symmetry patterns of the forms [F(x),G(y)] and [G(y),F(x)] 
-> trying a symmetry pattern of the form [F(x),G(x)] 
-> trying a symmetry pattern of the form [F(y),G(y)] 
-> trying a symmetry pattern of the form [F(x)+G(y), 0] 
-> trying a symmetry pattern of the form [0, F(x)+G(y)] 
-> trying a symmetry pattern of the form [F(x),G(x)*y+H(x)] 
-> trying a symmetry pattern of conformal type`
 

Solution by Maple

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

Order:=8; 
dsolve([diff(y(x),x)=y(x)+x*exp(y(x)),y(0) = 0],y(x),type='series',x=0);
 

\[ y \left (x \right ) = \frac {1}{2} x^{2}+\frac {1}{6} x^{3}+\frac {1}{6} x^{4}+\frac {1}{15} x^{5}+\frac {43}{720} x^{6}+\frac {151}{5040} x^{7}+\operatorname {O}\left (x^{8}\right ) \]

Solution by Mathematica

Time used: 0.059 (sec). Leaf size: 46

AsymptoticDSolveValue[{y'[x]==y[x]+x*Exp[y[x]],{y[0]==0}},y[x],{x,0,7}]
 

\[ y(x)\to \frac {151 x^7}{5040}+\frac {43 x^6}{720}+\frac {x^5}{15}+\frac {x^4}{6}+\frac {x^3}{6}+\frac {x^2}{2} \]