50.11.15 problem 4

Internal problem ID [7999]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Second-Order Linear Equations. Section 2.3. THE METHOD OF VARIATION OF PARAMETERS. Page 71
Problem number : 4
Date solved : Wednesday, March 05, 2025 at 05:23:03 AM
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.005 (sec). Leaf size: 23
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 \,{\mathrm e}^{5 x} c_{2} +{\mathrm e}^{x}-4 c_{1} \right ) {\mathrm e}^{-2 x}}{4} \]
Mathematica. Time used: 0.024 (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.188 (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} \]