24.1.21 problem 5(b)

Internal problem ID [4210]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 5(b)
Date solved : Sunday, March 30, 2025 at 02:43:00 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 32
ode:=(x^2+1)^(1/2)*diff(y(x),x)-y(x) = 2*(x^2+1)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x \sqrt {x^{2}+1}+\operatorname {arcsinh}\left (x \right )-x^{2}+c_1 \right ) \left (x +\sqrt {x^{2}+1}\right ) \]
Mathematica. Time used: 0.068 (sec). Leaf size: 31
ode=Sqrt[1+x^2]*D[y[x],x]-y[x]==2*Sqrt[1+x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{\text {arcsinh}(x)} \left (\text {arcsinh}(x)-x^2+\sqrt {x^2+1} x+c_1\right ) \]
Sympy. Time used: 0.374 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sqrt(x**2 + 1)*Derivative(y(x), x) - 2*sqrt(x**2 + 1) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{\operatorname {asinh}{\left (x \right )}} + x \operatorname {asinh}{\left (x \right )} + x + \sqrt {x^{2} + 1} \operatorname {asinh}{\left (x \right )} \]