9.6.1 problem 1

Internal problem ID [2958]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 10, page 41
Problem number : 1
Date solved : Tuesday, September 30, 2025 at 06:12:35 AM
CAS classification : [_linear]

\begin{align*} x y^{\prime }+2 y&=x^{2} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=x*diff(y(x),x)+2*y(x) = x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{4}+4 c_1}{4 x^{2}} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 19
ode=x*D[y[x],x]+2*y[x]==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2}{4}+\frac {c_1}{x^2} \end{align*}
Sympy. Time used: 0.108 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*Derivative(y(x), x) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {x^{4}}{4}}{x^{2}} \]