83.39.3 problem 3

Internal problem ID [19400]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (D) at page 135
Problem number : 3
Date solved : Monday, March 31, 2025 at 07:12:37 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }+y^{\prime }-\left (x^{2}+1\right ) y&={\mathrm e}^{-x} \end{align*}

Maple. Time used: 0.147 (sec). Leaf size: 119
ode:=x^2*diff(diff(y(x),x),x)+diff(y(x),x)-(x^2+1)*y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {HeunD}\left (4 \sqrt {2}, -1-4 \sqrt {2}, 8 \sqrt {2}, -4 \sqrt {2}+1, \frac {\sqrt {2}\, x -1}{\sqrt {2}\, x +1}\right ) \sqrt {x}\, {\mathrm e}^{-\frac {\left (x -1\right ) \left (x +1\right )}{x}} c_2 +\sqrt {x}\, {\mathrm e}^{x} \operatorname {HeunD}\left (-4 \sqrt {2}, -1-4 \sqrt {2}, 8 \sqrt {2}, -4 \sqrt {2}+1, \frac {\sqrt {2}\, x -1}{\sqrt {2}\, x +1}\right ) c_1 -\frac {{\mathrm e}^{-x}}{2} \]
Mathematica. Time used: 0.3 (sec). Leaf size: 81
ode=x^2*D[y[x],{x,2}]+D[y[x],x]-(1+x^2)*y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (\int _1^x-\frac {e^{-\frac {1}{K[2]}} \int _1^{K[2]}e^{\frac {1}{K[1]}-2 K[1]}dK[1]}{K[2]^2}dK[2]+\left (e^{-1/x}+c_2\right ) \int _1^xe^{\frac {1}{K[1]}-2 K[1]}dK[1]+c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - (x**2 + 1)*y(x) + Derivative(y(x), x) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -x**2*y(x) + x**2*Derivative(y(x), (x, 2)) - y(x) + Derivative(y(x), x) - exp(-x) cannot be solved by the factorable group method