18.2.7 problem Problem 15.7

Internal problem ID [3490]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 15, Higher order ordinary differential equations. 15.4 Exercises, page 523
Problem number : Problem 15.7
Date solved : Monday, January 27, 2025 at 07:39:35 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+y&=4 \,{\mathrm e}^{-x} \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 19

dsolve(diff(y(x),x$2)+2*diff(y(x),x)+y(x)=4*exp(-x),y(x), singsol=all)
 
\[ y \left (x \right ) = {\mathrm e}^{-x} \left (c_{1} x +2 x^{2}+c_{2} \right ) \]

Solution by Mathematica

Time used: 0.026 (sec). Leaf size: 23

DSolve[D[y[x],{x,2}]+2*D[y[x],x]+y[x]==4*Exp[-x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-x} \left (2 x^2+c_2 x+c_1\right ) \]