76.12.25 problem Ex. 27

Internal problem ID [20075]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 27
Date solved : Thursday, October 02, 2025 at 05:22:05 PM
CAS classification : [_linear]

\begin{align*} y^{\prime } \sqrt {a^{2}+x^{2}}+y&=\sqrt {a^{2}+x^{2}}-x \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 36
ode:=(a^2+x^2)^(1/2)*diff(y(x),x)+y(x) = (a^2+x^2)^(1/2)-x; 
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.047 (sec). Leaf size: 42
ode=Sqrt[a^2+x^2]*D[y[x],x]+y[x]==Sqrt[a^2+x^2]-x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {a^2 \log \left (\sqrt {a^2+x^2}+x\right )+c_1}{\sqrt {a^2+x^2}+x} \end{align*}
Sympy. Time used: 3.613 (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} \]