88.27.2 problem 2

Internal problem ID [24232]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 7. Series Methods. Exercises at page 226
Problem number : 2
Date solved : Thursday, October 02, 2025 at 10:01:07 PM
CAS classification : [[_linear, `class A`]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 20
Order:=6; 
ode:=diff(y(x),x) = 2*y(x)+x; 
ic:=[y(0) = 2]; 
dsolve([ode,op(ic)],y(x),type='series',x=0);
 
\[ y = 2+4 x +\frac {9}{2} x^{2}+3 x^{3}+\frac {3}{2} x^{4}+\frac {3}{5} x^{5}+\operatorname {O}\left (x^{6}\right ) \]
Mathematica. Time used: 0.024 (sec). Leaf size: 34
ode=D[y[x],{x,1}]==x+2*y[x]; 
ic={y[0]==2}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to \frac {3 x^5}{5}+\frac {3 x^4}{2}+3 x^3+\frac {9 x^2}{2}+4 x+2 \]
Sympy. Time used: 0.154 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x - 2*y(x) + Derivative(y(x), x),0) 
ics = {y(0): 2} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=6)
 
\[ y{\left (x \right )} = 2 + 4 x + \frac {9 x^{2}}{2} + 3 x^{3} + \frac {3 x^{4}}{2} + \frac {3 x^{5}}{5} + O\left (x^{6}\right ) \]