89.20.8 problem 8

Internal problem ID [24764]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 10. Nonhomogeneous Equations: Operational methods. Oral Exercises at page 154
Problem number : 8
Date solved : Thursday, October 02, 2025 at 10:47:48 PM
CAS classification : [[_2nd_order, _missing_y]]

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