85.26.1 problem 1

Internal problem ID [22589]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. C Exercises at page 57
Problem number : 1
Date solved : Sunday, October 12, 2025 at 05:53:14 AM
CAS classification : [_rational]

\begin{align*} x^{3}+2 x y^{2}-x +\left (x^{2} y+2 y^{3}-2 y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.101 (sec). Leaf size: 57
ode:=x^3+2*x*y(x)^2-x+(x^2*y(x)+2*y(x)^3-2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sqrt {-2 x^{2}-4 \operatorname {LambertW}\left (-\frac {{\mathrm e}^{\frac {x^{2}}{2}-c_1}}{2}\right )}}{2} \\ y &= \frac {\sqrt {-2 x^{2}-4 \operatorname {LambertW}\left (-\frac {{\mathrm e}^{\frac {x^{2}}{2}-c_1}}{2}\right )}}{2} \\ \end{align*}
Mathematica. Time used: 60.158 (sec). Leaf size: 65
ode=(x^3+2*x*y[x]^2-x)+(x^2*y[x]+2*y[x]^3-2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt {-\frac {x^2}{2}-W\left (c_1 e^{\frac {x^2}{2}}\right )}\\ y(x)&\to \sqrt {-\frac {x^2}{2}-W\left (c_1 e^{\frac {x^2}{2}}\right )} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3 + 2*x*y(x)**2 - x + (x**2*y(x) + 2*y(x)**3 - 2*y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out