58.2.14 problem 15

Internal problem ID [9137]
Book : Second order enumerated odes
Section : section 2
Problem number : 15
Date solved : Sunday, March 30, 2025 at 02:23:09 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-\frac {2 y}{x^{2}}&=x \,{\mathrm e}^{-\sqrt {x}} \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 51
ode:=diff(diff(y(x),x),x)-2/x^2*y(x) = x*exp(-x^(1/2)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {4 \,{\mathrm e}^{-\sqrt {x}} \left (7 x^{{5}/{2}}+140 x^{{3}/{2}}+x^{3}+35 x^{2}+840 \sqrt {x}+420 x +840\right )+c_2 \,x^{3}+c_1}{x} \]
Mathematica. Time used: 0.046 (sec). Leaf size: 57
ode=D[y[x],{x,2}]-2/x^2*y[x] == x*Exp[-x^(1/2)]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2 \int _1^x\frac {1}{3} e^{-\sqrt {K[1]}}dK[1]+c_2 x^2+\frac {2 \Gamma \left (8,\sqrt {x}\right )}{3 x}+\frac {c_1}{x} \]
Sympy. Time used: 1.005 (sec). Leaf size: 66
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(-sqrt(x)) + Derivative(y(x), (x, 2)) - 2*y(x)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\left (C_{1} x^{3} e^{\sqrt {x}} + C_{2} e^{\sqrt {x}} + 28 x^{\frac {5}{2}} + 560 x^{\frac {3}{2}} + 3360 \sqrt {x} + 4 x^{3} + 140 x^{2} + 1680 x + 3360\right ) e^{- \sqrt {x}}}{x} \]