85.36.12 problem 6 (a)

Internal problem ID [22740]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 171
Problem number : 6 (a)
Date solved : Thursday, October 02, 2025 at 09:14:13 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+y^{\prime }-2 y&={\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-2*y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_2 +{\mathrm e}^{-2 x} c_1 -\frac {{\mathrm e}^{-x}}{2} \]
Mathematica. Time used: 0.015 (sec). Leaf size: 29
ode=D[y[x],{x,2}]+D[y[x],{x,1}]-2*y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {e^{-x}}{2}+c_1 e^{-2 x}+c_2 e^x \end{align*}
Sympy. Time used: 0.114 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*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^{x} - \frac {e^{- x}}{2} \]