59.4.1 problem 9.1 (i)

Internal problem ID [15012]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 9, First order linear equations and the integrating factor. Exercises page 86
Problem number : 9.1 (i)
Date solved : Thursday, October 02, 2025 at 10:01:04 AM
CAS classification : [_linear]

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