24.1.20 problem 5(a)

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

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

Maple. Time used: 0.001 (sec). Leaf size: 34
ode:=(x^2+1)^(1/2)*diff(y(x),x)+y(x) = 2*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2}+x \sqrt {x^{2}+1}-\operatorname {arcsinh}\left (x \right )+c_1}{x +\sqrt {x^{2}+1}} \]
Mathematica. Time used: 0.084 (sec). Leaf size: 33
ode=Sqrt[1+x^2]*D[y[x],x]+y[x]==2*x; 
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.368 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + sqrt(x**2 + 1)*Derivative(y(x), x) + 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 )} \]