48.4.19 problem Problem 3.32

Internal problem ID [7561]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.6 Summary and Problems. Page 218
Problem number : Problem 3.32
Date solved : Sunday, March 30, 2025 at 12:15:15 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

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