78.5.19 problem 4 (h)

Internal problem ID [18091]
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 (h)
Date solved : Monday, March 31, 2025 at 05:07:50 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} x y^{\prime }+y&=\sqrt {x y}\, y^{\prime } \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 17
ode:=x*diff(y(x),x)+y(x) = (x*y(x))^(1/2)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ -2 \sqrt {x y}+y-c_1 = 0 \]
Mathematica. Time used: 7.702 (sec). Leaf size: 148
ode=x*D[y[x],x] +y[x]== Sqrt[x*y[x]]*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2 x-2 \sqrt {x \left (x-e^{c_1}\right )}-e^{c_1} \\ y(x)\to 2 \left (x+\sqrt {x \left (x-e^{c_1}\right )}\right )-e^{c_1} \\ y(x)\to 2 x-2 \sqrt {x \left (x+e^{c_1}\right )}+e^{c_1} \\ y(x)\to 2 \left (x+\sqrt {x \left (x+e^{c_1}\right )}\right )+e^{c_1} \\ y(x)\to 0 \\ y(x)\to 2 x-2 \sqrt {x^2} \\ y(x)\to 2 \left (\sqrt {x^2}+x\right ) \\ \end{align*}
Sympy. Time used: 2.449 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - sqrt(x*y(x))*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - C_{1} + 2 x - 2 \sqrt {x \left (- C_{1} + x\right )}, \ y{\left (x \right )} = - C_{1} + 2 x + 2 \sqrt {x \left (- C_{1} + x\right )}\right ] \]