20.5.17 problem 21

Internal problem ID [4291]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 21
Date solved : Tuesday, September 30, 2025 at 07:13:09 AM
CAS classification : [_linear]

\begin{align*} \left (x^{2}+1\right ) y^{\prime }+2 x y&=4 x^{3} \end{align*}
Maple. Time used: 0.001 (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.026 (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.188 (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} \]