85.33.4 problem 4

Internal problem ID [22627]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 4
Date solved : Thursday, October 02, 2025 at 08:56:51 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\frac {2 y}{x}&=x^{2} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=diff(y(x),x)+2*y(x)/x = x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{5}+5 c_1}{5 x^{2}} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 19
ode=D[y[x],x]+2*y[x]/x==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^3}{5}+\frac {c_1}{x^2} \end{align*}
Sympy. Time used: 0.111 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 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^{5}}{5}}{x^{2}} \]