60.1.189 problem 192

Internal problem ID [10203]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 192
Date solved : Sunday, March 30, 2025 at 03:30:27 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 36
ode:=(a^2+x^2)^(1/2)*diff(y(x),x)+y(x)-(a^2+x^2)^(1/2)+x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {a^{2} \ln \left (x +\sqrt {a^{2}+x^{2}}\right )+c_1}{x +\sqrt {a^{2}+x^{2}}} \]
Mathematica. Time used: 0.082 (sec). Leaf size: 42
ode=Sqrt[x^2+a^2]*D[y[x],x] + y[x] - Sqrt[x^2+a^2] + x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {a^2 \log \left (\sqrt {a^2+x^2}+x\right )+c_1}{\sqrt {a^2+x^2}+x} \]
Sympy. Time used: 5.268 (sec). Leaf size: 63
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(x + sqrt(a**2 + x**2)*Derivative(y(x), x) - sqrt(a**2 + x**2) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \int \frac {\left (x - \sqrt {a^{2} + x^{2}} + y{\left (x \right )}\right ) e^{\operatorname {asinh}{\left (\frac {x}{a} \right )}}}{\sqrt {a^{2} + x^{2}}}\, dx}{e^{\operatorname {asinh}{\left (\frac {x}{a} \right )}} - \int \frac {e^{\operatorname {asinh}{\left (\frac {x}{a} \right )}}}{\sqrt {a^{2} + x^{2}}}\, dx} \]