23.1.192 problem 192 (a)

Internal problem ID [4799]
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 : 192 (a)
Date solved : Tuesday, September 30, 2025 at 08:40:55 AM
CAS classification : [_rational, _Bernoulli]

\begin{align*} x y^{\prime }+y&=a \left (x^{2}+1\right ) y^{3} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 43
ode:=x*diff(y(x),x)+y(x) = a*(x^2+1)*y(x)^3; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {1}{\sqrt {-2 \ln \left (x \right ) x^{2} a +c_1 \,x^{2}+a}} \\ y &= -\frac {1}{\sqrt {-2 \ln \left (x \right ) x^{2} a +c_1 \,x^{2}+a}} \\ \end{align*}
Mathematica. Time used: 0.465 (sec). Leaf size: 68
ode=x*D[y[x],x]+y[x]==a*(1+x^2)*y[x]^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{\sqrt {3 a x^2-2 a x^2 \log (x)+a+c_1 x^2}}\\ y(x)&\to \frac {1}{\sqrt {3 a x^2-2 a x^2 \log (x)+a+c_1 x^2}}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.982 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*(x**2 + 1)*y(x)**3 + x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\frac {1}{C_{1} x^{2} - 2 a x^{2} \log {\left (x \right )} + a}}, \ y{\left (x \right )} = \sqrt {\frac {1}{C_{1} x^{2} - 2 a x^{2} \log {\left (x \right )} + a}}\right ] \]