29.13.20 problem 374

Internal problem ID [4974]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 13
Problem number : 374
Date solved : Sunday, March 30, 2025 at 04:27:31 AM
CAS classification : [_rational, _Riccati]

\begin{align*} x \left (-x^{3}+1\right ) y^{\prime }&=x^{2}+\left (1-2 x y\right ) y \end{align*}

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