85.36.6 problem 3 (b)

Internal problem ID [22734]
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 : 3 (b)
Date solved : Thursday, October 02, 2025 at 09:14:10 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y&={\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)-y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_2 +{\mathrm e}^{x} c_1 -\frac {x \,{\mathrm e}^{-x}}{2} \]
Mathematica. Time used: 0.063 (sec). Leaf size: 32
ode=D[y[x],{x,2}]-y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} e^{-x} \left (-2 x+4 c_1 e^{2 x}-1+4 c_2\right ) \end{align*}
Sympy. Time used: 0.062 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + Derivative(y(x), (x, 2)) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{x} + \left (C_{1} - \frac {x}{2}\right ) e^{- x} \]