51.1.3 problem 2. Using series method

Internal problem ID [8214]
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 : 2. Using series method
Date solved : Monday, January 27, 2025 at 03:46:08 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }-2 y&=x^{2} \end{align*}

Using series method with expansion around

\begin{align*} 1 \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=1 \end{align*}

Solution by Maple

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

Order:=8; 
dsolve([diff(y(x),x)-2*y(x)=x^2,y(1) = 1],y(x),type='series',x=1);
 
\[ y = 1+3 \left (x -1\right )+4 \left (x -1\right )^{2}+3 \left (x -1\right )^{3}+\frac {3}{2} \left (x -1\right )^{4}+\frac {3}{5} \left (x -1\right )^{5}+\frac {1}{5} \left (x -1\right )^{6}+\frac {2}{35} \left (x -1\right )^{7}+\operatorname {O}\left (\left (x -1\right )^{8}\right ) \]

Solution by Mathematica

Time used: 0.013 (sec). Leaf size: 60

AsymptoticDSolveValue[{D[y[x],x]-2*y[x]==x^2,{y[1]==1}},y[x],{x,1,"8"-1}]
 
\[ y(x)\to \frac {2}{35} (x-1)^7+\frac {1}{5} (x-1)^6+\frac {3}{5} (x-1)^5+\frac {3}{2} (x-1)^4+3 (x-1)^3+4 (x-1)^2+3 (x-1)+1 \]