23.1.379 problem 364

Internal problem ID [4986]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 364
Date solved : Tuesday, September 30, 2025 at 09:08:53 AM
CAS classification : [_linear]

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