29.24.4 problem 666

Internal problem ID [5257]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 24
Problem number : 666
Date solved : Sunday, March 30, 2025 at 07:32:05 AM
CAS classification : [[_homogeneous, `class G`], _rational]

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

Maple. Time used: 0.372 (sec). Leaf size: 45
ode:=x*(1+x*y(x)^2)*diff(y(x),x) = (2-3*x*y(x)^2)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {c_1 +\sqrt {4 x^{5}+c_1^{2}}}{2 x^{3}} \\ y &= \frac {c_1 -\sqrt {4 x^{5}+c_1^{2}}}{2 x^{3}} \\ \end{align*}
Mathematica. Time used: 1.313 (sec). Leaf size: 75
ode=x(1+x y[x]^2)D[y[x],x]==(2-3 x y[x]^2)y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {4 x^5+e^{5 c_1}}+e^{\frac {5 c_1}{2}}}{2 x^3} \\ y(x)\to \frac {\sqrt {4 x^5+e^{5 c_1}}-e^{\frac {5 c_1}{2}}}{2 x^3} \\ \end{align*}
Sympy. Time used: 12.420 (sec). Leaf size: 180
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x*y(x)**2 + 1)*Derivative(y(x), x) - (-3*x*y(x)**2 + 2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {\sqrt {2} \sqrt {\frac {2 - \frac {\sqrt {4 x^{5} e^{C_{1}} + 1} e^{- C_{1}}}{x^{5}} + \frac {e^{- C_{1}}}{x^{5}}}{x}}}{2}, \ y{\left (x \right )} = - \frac {\sqrt {2} \sqrt {\frac {2 - \frac {\sqrt {4 x^{5} e^{C_{1}} + 1} e^{- C_{1}}}{x^{5}} + \frac {e^{- C_{1}}}{x^{5}}}{x}}}{2}, \ y{\left (x \right )} = - \frac {\sqrt {2} \sqrt {\frac {2 + \frac {\sqrt {4 x^{5} e^{C_{1}} + 1} e^{- C_{1}}}{x^{5}} + \frac {e^{- C_{1}}}{x^{5}}}{x}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {2} \sqrt {\frac {2 + \frac {\sqrt {4 x^{5} e^{C_{1}} + 1} e^{- C_{1}}}{x^{5}} + \frac {e^{- C_{1}}}{x^{5}}}{x}}}{2}\right ] \]