46.1.3 problem 8

Internal problem ID [7293]
Book : ADVANCED ENGINEERING MATHEMATICS. ERWIN KREYSZIG, HERBERT KREYSZIG, EDWARD J. NORMINTON. 10th edition. John Wiley USA. 2011
Section : Chapter 5. Series Solutions of ODEs. Special Functions. Problem set 5.1. page 174
Problem number : 8
Date solved : Sunday, March 30, 2025 at 11:53:36 AM
CAS classification : [_separable]

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

Using series method with expansion around

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

Maple. Time used: 0.025 (sec). Leaf size: 24
Order:=6; 
ode:=x*diff(y(x),x)-3*y(x) = k; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_1 \,x^{3} \left (1+\operatorname {O}\left (x^{6}\right )\right )+\left (-\frac {k}{3}+\operatorname {O}\left (x^{6}\right )\right ) \]
Mathematica. Time used: 0.008 (sec). Leaf size: 15
ode=x*D[y[x],x]-3*y[x]==k; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to -\frac {k}{3}+c_1 x^3 \]
Sympy
from sympy import * 
x = symbols("x") 
k = symbols("k") 
y = Function("y") 
ode = Eq(-k + x*Derivative(y(x), x) - 3*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=6)
 
ValueError : ODE -k + x*Derivative(y(x), x) - 3*y(x) does not match hint 1st_power_series