58.12.17 problem 17

Internal problem ID [14802]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number : 17
Date solved : Thursday, October 02, 2025 at 09:55:04 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&=\frac {{\mathrm e}^{-x}}{x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+3*diff(y(x),x)+2*y(x) = exp(-x)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\int {\mathrm e}^{-x} \left (\operatorname {Ei}_{1}\left (-x \right )-c_1 \right )d x +c_2 \right ) {\mathrm e}^{-x} \]
Mathematica. Time used: 0.023 (sec). Leaf size: 30
ode=D[y[x],{x,2}]+3*D[y[x],x]+2*y[x]==Exp[-x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2 x} \left (-\operatorname {ExpIntegralEi}(x)+e^x \log (x)+c_2 e^x+c_1\right ) \end{align*}
Sympy. Time used: 0.338 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \left (C_{2} - \operatorname {Ei}{\left (x \right )}\right ) e^{- x} + \log {\left (x \right )}\right ) e^{- x} \]