29.11.15 problem 306

Internal problem ID [4906]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 11
Problem number : 306
Date solved : Sunday, March 30, 2025 at 04:10:15 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 53
ode:=(a^2+x^2)*diff(y(x),x) = (b+y(x))*(x+(a^2+x^2)^(1/2)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (c_1 \sqrt {a^{2}+x^{2}}\, a^{2}+b x \right ) \left (x \sqrt {a^{2}+x^{2}}+a^{2}+x^{2}\right )}{\sqrt {a^{2}+x^{2}}\, a^{2}} \]
Mathematica. Time used: 0.284 (sec). Leaf size: 81
ode=(a^2+x^2)D[y[x],x]==(b+y[x])(x+Sqrt[a^2+x^2]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\left (x \left (x-\sqrt {a^2+x^2}\right )+a^2\right ) \left (b x-c_1 \sqrt {a^2+x^2}\right )}{\sqrt {a^2+x^2} \left (x-\sqrt {a^2+x^2}\right )^2} \\ y(x)\to -b \\ \end{align*}
Sympy. Time used: 2.709 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq((a**2 + x**2)*Derivative(y(x), x) - (b + y(x))*(x + sqrt(a**2 + x**2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sqrt {a^{2} + x^{2}} e^{\operatorname {asinh}{\left (\frac {x}{a} \right )}} - b \]