28.1.95 problem 117

Internal problem ID [4401]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 117
Date solved : Sunday, March 30, 2025 at 03:17:09 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.004 (sec). Leaf size: 71
ode:=2*(x*y(x))^(1/2)-y(x)-x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {-\sqrt {x y}\, y c_1 x +\sqrt {x y}\, c_1 \,x^{2}+y c_1 \,x^{2}-c_1 \,x^{3}+\sqrt {x y}+x}{\left (y-x \right ) \left (\sqrt {x y}-x \right ) x} = 0 \]
Mathematica. Time used: 0.221 (sec). Leaf size: 26
ode=(2*Sqrt[x*y[x]]-y[x])-x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\left (x+e^{\frac {c_1}{2}}\right ){}^2}{x} \\ y(x)\to x \\ \end{align*}
Sympy. Time used: 1.284 (sec). Leaf size: 15
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 )} = x + 2 e^{C_{1}} + \frac {e^{2 C_{1}}}{x} \]