9.22.4 problem 4

Internal problem ID [3338]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 40, page 186
Problem number : 4
Date solved : Tuesday, September 30, 2025 at 06:36:44 AM
CAS classification : [_linear]

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

Using series method with expansion around

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

With initial conditions

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