78.6.6 problem 2 (f)

Internal problem ID [18103]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 10 (Linear equations). Problems at page 82
Problem number : 2 (f)
Date solved : Monday, March 31, 2025 at 05:10:22 PM
CAS classification : [_linear]

\begin{align*} 2 y-x^{3}&=x y^{\prime } \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=2*y(x)-x^3 = x*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-x +c_1 \right ) x^{2} \]
Mathematica. Time used: 0.026 (sec). Leaf size: 15
ode=(2*y[x]-x^3)==x*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2 (-x+c_1) \]
Sympy. Time used: 0.220 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x*Derivative(y(x), x) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} \left (C_{1} - x\right ) \]