37.3.10 problem 10.4.9 (ii)

Internal problem ID [6416]
Book : Basic Training in Mathematics. By R. Shankar. Plenum Press. NY. 1995
Section : Chapter 10, Differential equations. Section 10.4, ODEs with variable Coefficients. Second order and Homogeneous. page 318
Problem number : 10.4.9 (ii)
Date solved : Sunday, March 30, 2025 at 10:55:05 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=diff(y(x),x)+2*y(x)/x-x^3 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{6}+6 c_1}{6 x^{2}} \]
Mathematica. Time used: 0.028 (sec). Leaf size: 13
ode=D[y[x],x]-2*y[x]/x-x^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2 (x+c_1) \]
Sympy. Time used: 0.211 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + Derivative(y(x), x) + 2*y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {x^{6}}{6}}{x^{2}} \]