32.3.3 problem 3

Internal problem ID [7768]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Test Excercise 25. page 1093
Problem number : 3
Date solved : Tuesday, September 30, 2025 at 05:05:14 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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