85.12.7 problem 7

Internal problem ID [22501]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 40
Problem number : 7
Date solved : Thursday, October 02, 2025 at 08:43:11 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

\begin{align*} x y^{\prime }&=y-\sqrt {x^{2}+y^{2}} \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 19
ode:=x*diff(y(x),x) = y(x)-(x^2+y(x)^2)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ y+\sqrt {x^{2}+y^{2}}-c_1 = 0 \]
Mathematica. Time used: 0.18 (sec). Leaf size: 15
ode=x*D[y[x],x]== y[x]-Sqrt[x^2+y[x]^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \sinh (-\log (x)+c_1) \end{align*}
Sympy. Time used: 0.726 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + sqrt(x**2 + y(x)**2) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \sinh {\left (C_{1} - \log {\left (x \right )} \right )} \]