48.1.4 problem Example 3.4

Internal problem ID [7505]
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.2 FIRST ORDER ODE. Page 114
Problem number : Example 3.4
Date solved : Wednesday, March 05, 2025 at 04:41:16 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.004 (sec). Leaf size: 19
ode:=x*diff(y(x),x)-2*(x*y(x))^(1/2) = y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ -\frac {y}{\sqrt {x y}}+\ln \left (x \right )-c_{1} = 0 \]
Mathematica. Time used: 0.197 (sec). Leaf size: 19
ode=x*D[y[x],x]-2*Sqrt[x*y[x]]==y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} x (2 \log (x)+c_1){}^2 \]
Sympy. Time used: 0.543 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - 2*sqrt(x*y(x)) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1}^{2} x + x \log {\left (x \right )}^{2} - \log {\left (x^{2 C_{1} x} \right )} \]