39.5.10 problem Problem 24.32

Internal problem ID [6552]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 24. Solutions of linear DE by Laplace transforms. Supplementary Problems. page 248
Problem number : Problem 24.32
Date solved : Sunday, March 30, 2025 at 11:07:10 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=1\\ y^{\prime }\left (0\right )&=1 \end{align*}

Maple. Time used: 0.128 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+5*y(x) = 3*exp(-2*x); 
ic:=y(0) = 1, D(y)(0) = 1; 
dsolve([ode,ic],y(x),method='laplace');
 
\[ y = \frac {3 \,{\mathrm e}^{-2 x}}{5}+\frac {{\mathrm e}^{-x} \left (4 \cos \left (2 x \right )+13 \sin \left (2 x \right )\right )}{10} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 34
ode=D[y[x],{x,2}]+2*D[y[x],x]+5*y[x]==3*Exp[-2*x]; 
ic={y[0]==1,Derivative[1][y][0] ==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{10} e^{-2 x} \left (13 e^x \sin (2 x)+4 e^x \cos (2 x)+6\right ) \]
Sympy. Time used: 0.294 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 3*exp(-2*x),0) 
ics = {y(0): 1, Subs(Derivative(y(x), x), x, 0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\frac {13 \sin {\left (2 x \right )}}{10} + \frac {2 \cos {\left (2 x \right )}}{5} + \frac {3 e^{- x}}{5}\right ) e^{- x} \]