40.16.1 problem 9

Internal problem ID [6792]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 25. Integration in series. Supplemetary problems. Page 205
Problem number : 9
Date solved : Sunday, March 30, 2025 at 11:22:58 AM
CAS classification : [_linear]

\begin{align*} \left (1-x \right ) y^{\prime }&=x^{2}-y \end{align*}

Using series method with expansion around

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

Maple. Time used: 0.004 (sec). Leaf size: 32
Order:=6; 
ode:=(1-x)*diff(y(x),x) = x^2-y(x); 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1-x \right ) y \left (0\right )+\frac {x^{3}}{3}+\frac {x^{4}}{6}+\frac {x^{5}}{10}+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.005 (sec). Leaf size: 33
ode=(1-x)*D[y[x],x]==x^2-y[x]; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to \frac {x^5}{10}+\frac {x^4}{6}+\frac {x^3}{3}+c_1 (1-x) \]
Sympy. Time used: 0.993 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + (1 - x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=6)
 
\[ y{\left (x \right )} = \frac {x^{3}}{3} + \frac {x^{4}}{6} + \frac {x^{5}}{10} + C_{1} - C_{1} x + O\left (x^{6}\right ) \]