72.8.21 problem 21

Internal problem ID [19505]
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. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 21
Date solved : Thursday, October 02, 2025 at 04:33:25 PM
CAS classification : [_linear]

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