78.5.12 problem 4 (a)

Internal problem ID [18084]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 9 (Integrating Factors). Problems at page 80
Problem number : 4 (a)
Date solved : Monday, March 31, 2025 at 05:07:30 PM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational]

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

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