29.25.4 problem 701

Internal problem ID [5291]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 25
Problem number : 701
Date solved : Tuesday, March 04, 2025 at 09:16:20 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.012 (sec). Leaf size: 46
ode:=x*(2-x*y(x)^2-2*x*y(x)^3)*diff(y(x),x)+1+2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= -{\frac {1}{2}} \\ y \left (x \right ) &= \frac {{\mathrm e}^{\operatorname {RootOf}\left (x \,{\mathrm e}^{3 \textit {\_Z}}-4 x \,{\mathrm e}^{2 \textit {\_Z}}+8 c_{1} x \,{\mathrm e}^{\textit {\_Z}}+2 \textit {\_Z} \,{\mathrm e}^{\textit {\_Z}} x +3 \,{\mathrm e}^{\textit {\_Z}} x +16\right )}}{2}-\frac {1}{2} \\ \end{align*}
Mathematica. Time used: 0.311 (sec). Leaf size: 47
ode=x(2-x y[x]^2-2 x y[x]^3)D[y[x],x]+1+2 y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{64} \left (-4 y(x)^2+4 y(x)-2 \log (8 y(x)+4)+3\right )-\frac {1}{4 x (2 y(x)+1)}=c_1,y(x)\right ] \]
Sympy. Time used: 1.638 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(-2*x*y(x)**3 - x*y(x)**2 + 2)*Derivative(y(x), x) + 2*y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} - \frac {y^{2}{\left (x \right )}}{4} + \frac {y{\left (x \right )}}{4} - \frac {\log {\left (2 y{\left (x \right )} + 1 \right )}}{8} - \frac {1}{x \left (2 y{\left (x \right )} + 1\right )} = 0 \]