18.2.3 problem Problem 15.2(b)

Internal problem ID [3486]
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.2(b)
Date solved : Monday, January 27, 2025 at 07:39:21 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} f^{\prime \prime }+2 f^{\prime }+5 f&={\mathrm e}^{-t} \cos \left (3 t \right ) \end{align*}

With initial conditions

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

Solution by Maple

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

dsolve([diff(f(t),t$2)+2*diff(f(t),t)+5*f(t)=exp(-t)*cos(3*t),f(0) = 0, D(f)(0) = 0],f(t), singsol=all)
 
\[ f = -\frac {\left (4 \cos \left (t \right )^{3}-2 \cos \left (t \right )^{2}-3 \cos \left (t \right )+1\right ) {\mathrm e}^{-t}}{5} \]

Solution by Mathematica

Time used: 0.074 (sec). Leaf size: 34

DSolve[{D[ f[t],{t,2}]+2*D[ f[t],t]+5*f[t]==Exp[-t]*Cos[3*t],{f[0]==0,Derivative[1][f][0]==0}},f[t],t,IncludeSingularSolutions -> True]
 
\[ f(t)\to \frac {2}{5} e^{-t} \sin ^2\left (\frac {t}{2}\right ) (2 \cos (t)+2 \cos (2 t)+1) \]