85.33.20 problem 20

Internal problem ID [22643]
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. A Exercises at page 65
Problem number : 20
Date solved : Thursday, October 02, 2025 at 08:57:22 PM
CAS classification : [[_homogeneous, `class G`], _rational]

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