32.4.1 problem Recognizable Exact Differential equations. Integrating factors. Example 10.51, page 90

Internal problem ID [5812]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 10
Problem number : Recognizable Exact Differential equations. Integrating factors. Example 10.51, page 90
Date solved : Tuesday, March 04, 2025 at 11:47:19 PM
CAS classification : [_separable]

\begin{align*} y^{2}+y-x y^{\prime }&=0 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 13
ode:=y(x)^2+y(x)-x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {x}{-x +c_{1}} \]
Mathematica. Time used: 0.326 (sec). Leaf size: 32
ode=(y[x]^2+y[x])-x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {e^{c_1} x}{1-e^{c_1} x} \\ y(x)\to -1 \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.268 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*Derivative(y(x), x) + y(x)**2 + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {x e^{C_{1}}}{x e^{C_{1}} - 1} \]