42.1.20 problem 3.48 (b)

Internal problem ID [6842]
Book : Advanced Mathematical Methods for Scientists and Engineers, Bender and Orszag. Springer October 29, 1999
Section : Chapter 3. APPROXIMATE SOLUTION OF LINEAR DIFFERENTIAL EQUATIONS. page 136
Problem number : 3.48 (b)
Date solved : Wednesday, March 05, 2025 at 02:46:53 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }+x y&=\frac {1}{x^{3}} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 41
ode:=diff(y(x),x)+x*y(x) = 1/x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {4 c_1 \,x^{2} {\mathrm e}^{-\frac {x^{2}}{2}}-\operatorname {Ei}_{1}\left (-\frac {x^{2}}{2}\right ) x^{2} {\mathrm e}^{-\frac {x^{2}}{2}}-2}{4 x^{2}} \]
Mathematica. Time used: 0.102 (sec). Leaf size: 46
ode=D[y[x],x]+x*y[x]==1/x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} e^{-\frac {x^2}{2}} \operatorname {ExpIntegralEi}\left (\frac {x^2}{2}\right )-\frac {1}{2 x^2}+c_1 e^{-\frac {x^2}{2}} \]
Sympy. Time used: 4.097 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + Derivative(y(x), x) - 1/x**3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - \frac {\operatorname {E}_{2}\left (- \frac {x^{2}}{2}\right )}{2 x^{2}}\right ) e^{- \frac {x^{2}}{2}} \]