15.2.10 problem 10

Internal problem ID [2880]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 6, page 25
Problem number : 10
Date solved : Sunday, March 30, 2025 at 12:39:36 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.005 (sec). Leaf size: 71
ode:=y(x)+x*diff(y(x),x) = 2*(x*y(x))^(1/2); 
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.197 (sec). Leaf size: 26
ode=x*D[y[x],x]+y[x]==2*Sqrt[x*y[x]]; 
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.352 (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} \]