89.19.21 problem 21

Internal problem ID [24749]
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. Exercises at page 151
Problem number : 21
Date solved : Thursday, October 02, 2025 at 10:47:39 PM
CAS classification : [[_3rd_order, _missing_y]]

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