32.1.4 problem 4

Internal problem ID [7709]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Test excercise 24. page 1067
Problem number : 4
Date solved : Tuesday, September 30, 2025 at 04:56:23 PM
CAS classification : [_linear]

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