65.4.1 problem 9.1 (i)

Internal problem ID [13652]
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 : Wednesday, March 05, 2025 at 10:10:00 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (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.025 (sec). Leaf size: 19
ode=D[y[x],x]+y[x]/x==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3}{4}+\frac {c_1}{x} \]
Sympy. Time used: 0.183 (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} \]