47.2.20 problem 20

Internal problem ID [7436]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 20
Date solved : Sunday, March 30, 2025 at 12:04:04 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

Maple. Time used: 0.029 (sec). Leaf size: 28
ode:=x*diff(y(x),x) = y(x)+(y(x)^2-x^2)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {-c_1 \,x^{2}+\sqrt {y^{2}-x^{2}}+y}{x^{2}} = 0 \]
Mathematica. Time used: 0.391 (sec). Leaf size: 14
ode=x*D[y[x],x]==y[x]+Sqrt[y[x]^2-x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x \cosh (\log (x)+c_1) \]
Sympy. Time used: 1.495 (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 \cosh {\left (C_{1} - \log {\left (x \right )} \right )} \]