88.27.4 problem 4

Internal problem ID [24234]
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 : 4
Date solved : Thursday, October 02, 2025 at 10:01:08 PM
CAS classification : [[_linear, `class A`]]

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

Using series method with expansion around

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

With initial conditions

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