26.3.4 problem 4(a)

Internal problem ID [4264]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 10, page 47
Problem number : 4(a)
Date solved : Sunday, March 30, 2025 at 02:48:00 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational]

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

Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=(x-1-y(x)^2)*diff(y(x),x)-y(x) = 0; 
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.285 (sec). Leaf size: 56
ode=(x-1-y[x]^2)*D[y[x],x]-y[x]==0; 
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.792 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((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 ] \]