78.14.2 problem 2

Internal problem ID [18267]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 19. The Method of Variation of Parameters. Problems at page 135
Problem number : 2
Date solved : Monday, March 31, 2025 at 05:24:20 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y^{\prime }-6 y&={\mathrm e}^{-x} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)-diff(y(x),x)-6*y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (4 c_2 \,{\mathrm e}^{5 x}-{\mathrm e}^{x}+4 c_1 \right ) {\mathrm e}^{-2 x}}{4} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 31
ode=D[y[x],{x,2}] -D[y[x],x]-6*y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {e^{-x}}{4}+c_1 e^{-2 x}+c_2 e^{3 x} \]
Sympy. Time used: 0.193 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-6*y(x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{3 x} - \frac {e^{- x}}{4} \]