88.18.1 problem 1

Internal problem ID [24120]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 5. Special Techniques for Linear Equations. Exercises at page 133
Problem number : 1
Date solved : Thursday, October 02, 2025 at 10:00:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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