28.1.42 problem 43

Internal problem ID [4348]
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 : 43
Date solved : Sunday, March 30, 2025 at 03:09:04 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=y(x)*(1+y(x)^2)^(1/2)+(x*(1+y(x)^2)^(1/2)-y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {x y-c_1 -\sqrt {1+y^{2}}}{y} = 0 \]
Mathematica. Time used: 0.444 (sec). Leaf size: 82
ode=(y[x]*Sqrt[1+y[x]^2])+(x*Sqrt[1+y[x]^2]-y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {c_1 x-\sqrt {x^2-1+c_1{}^2}}{x^2-1} \\ y(x)\to \frac {\sqrt {x^2-1+c_1{}^2}+c_1 x}{x^2-1} \\ y(x)\to 0 \\ y(x)\to -i \\ y(x)\to i \\ \end{align*}
Sympy. Time used: 2.829 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*sqrt(y(x)**2 + 1) - y(x))*Derivative(y(x), x) + sqrt(y(x)**2 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {- C_{1} x - \sqrt {C_{1}^{2} + x^{2} - 1}}{x^{2} - 1}, \ y{\left (x \right )} = \frac {- C_{1} x + \sqrt {C_{1}^{2} + x^{2} - 1}}{x^{2} - 1}\right ] \]