29.37.2 problem 1115

Internal problem ID [5660]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 37
Problem number : 1115
Date solved : Sunday, March 30, 2025 at 09:54:01 AM
CAS classification : [[_homogeneous, `class G`], _Clairaut]

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

Maple. Time used: 0.203 (sec). Leaf size: 15
ode:=2*(a*diff(y(x),x))^(1/2)+x*diff(y(x),x)-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 \sqrt {a c_1}+c_1 x \]
Mathematica. Time used: 0.082 (sec). Leaf size: 25
ode=2 Sqrt[a D[y[x],x]]+x D[y[x],x]-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2 \sqrt {a c_1}+c_1 x \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 5.955 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + 2*sqrt(a*Derivative(y(x), x)) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} C_{1} x & \text {for}\: a = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \frac {C_{1} \left (C_{1} x - 2 a\right )}{a} & \text {for}\: a \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} C_{1} x & \text {for}\: a = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \frac {C_{1} \left (C_{1} x - 2 a\right )}{a} & \text {for}\: a \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}\right ] \]