28.1.41 problem 42

Internal problem ID [4347]
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 : 42
Date solved : Sunday, March 30, 2025 at 03:06:16 AM
CAS classification : [[_homogeneous, `class G`], _dAlembert]

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

Maple. Time used: 0.058 (sec). Leaf size: 47
ode:=x-(x^2+y(x)^2)^(1/2)+(y(x)-(x^2+y(x)^2)^(1/2))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {\left (y+x \right ) \sqrt {x^{2}+y^{2}}+\left (-c_1 \,x^{2}+1\right ) y^{2}+y x +x^{2}}{y^{2} x^{2}} = 0 \]
Mathematica. Time used: 0.659 (sec). Leaf size: 34
ode=(x-Sqrt[x^2+y[x]^2])+(y[x]-Sqrt[x^2+y[x]^2])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {e^{c_1} \left (2 x+e^{c_1}\right )}{2 \left (x+e^{c_1}\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 20.272 (sec). Leaf size: 73
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - sqrt(x**2 + y(x)**2) + (-sqrt(x**2 + y(x)**2) + y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \int \limits ^{\frac {x}{y{\left (x \right )}}} \frac {u_{1}}{u_{1}^{2} - u_{1} \sqrt {u_{1}^{2} + 1} - \sqrt {u_{1}^{2} + 1} + 1}\, du_{1} + \int \limits ^{\frac {x}{y{\left (x \right )}}} \frac {\sqrt {u_{1}^{2} + 1}}{u_{1}^{2} - u_{1} \sqrt {u_{1}^{2} + 1} - \sqrt {u_{1}^{2} + 1} + 1}\, du_{1}} \]