47.2.21 problem 21

Internal problem ID [7437]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 21
Date solved : Sunday, March 30, 2025 at 12:04:11 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

\begin{align*} y+\left (2 \sqrt {x y}-x \right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 18
ode:=y(x)+(2*(x*y(x))^(1/2)-x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \ln \left (y\right )+\frac {x}{\sqrt {x y}}-c_1 = 0 \]
Mathematica. Time used: 0.233 (sec). Leaf size: 33
ode=y[x]+(2*Sqrt[x*y[x]]-x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {2}{\sqrt {\frac {y(x)}{x}}}+2 \log \left (\frac {y(x)}{x}\right )=-2 \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 2.237 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x + 2*sqrt(x*y(x)))*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = e^{C_{1} + 2 W\left (- \frac {\sqrt {x} e^{- \frac {C_{1}}{2}}}{2}\right )}, \ y{\left (x \right )} = e^{C_{1} + 2 W\left (\frac {\sqrt {x} e^{- \frac {C_{1}}{2}}}{2}\right )}\right ] \]