85.15.9 problem 1 (i)

Internal problem ID [22534]
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 47
Problem number : 1 (i)
Date solved : Thursday, October 02, 2025 at 08:48:31 PM
CAS classification : [[_Abel, `2nd type`, `class B`]]

\begin{align*} y^{\prime }&=\frac {y \left (y-{\mathrm e}^{x}\right )}{{\mathrm e}^{x}-2 y x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 47
ode:=diff(y(x),x) = y(x)*(y(x)-exp(x))/(exp(x)-2*x*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {{\mathrm e}^{x}+\sqrt {{\mathrm e}^{2 x}+4 c_1 x}}{2 x} \\ y &= -\frac {-{\mathrm e}^{x}+\sqrt {{\mathrm e}^{2 x}+4 c_1 x}}{2 x} \\ \end{align*}
Mathematica. Time used: 2.48 (sec). Leaf size: 63
ode=D[y[x],x]== ( y[x]*(y[x]-Exp[x]))/( Exp[x]-2*x*y[x] ); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x-\sqrt {e^{2 x}+4 c_1 x}}{2 x}\\ y(x)&\to \frac {e^x+\sqrt {e^{2 x}+4 c_1 x}}{2 x} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (y(x) - exp(x))*y(x)/(-2*x*y(x) + exp(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-y(x) + exp(x))*y(x)/(2*x*y(x) - exp(x))