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 : Tuesday, March 04, 2025 at 06:39:37 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.006 (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 {x^{2} c_{1} y \left (x \right )-y \left (x \right ) \sqrt {x y \left (x \right )}\, c_{1} x -c_{1} x^{3}+\sqrt {x y \left (x \right )}\, c_{1} x^{2}+x +\sqrt {x y \left (x \right )}}{\left (-x +y \left (x \right )\right ) \left (\sqrt {x y \left (x \right )}-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} \]