12.2.2 problem Problem 15.2(a)

Internal problem ID [3485]
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(a)
Date solved : Tuesday, September 30, 2025 at 06:40:39 AM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} f^{\prime \prime }+2 f^{\prime }+5 f&=0 \end{align*}

With initial conditions

\begin{align*} f \left (0\right )&=1 \\ f^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.076 (sec). Leaf size: 20
ode:=diff(diff(f(t),t),t)+2*diff(f(t),t)+5*f(t) = 0; 
ic:=[f(0) = 1, D(f)(0) = 0]; 
dsolve([ode,op(ic)],f(t), singsol=all);
 
\[ f = {\mathrm e}^{-t} \left (\frac {\sin \left (2 t \right )}{2}+\cos \left (2 t \right )\right ) \]
Mathematica. Time used: 0.012 (sec). Leaf size: 25
ode=D[ f[t],{t,2}]+2*D[ f[t],t]+5*f[t]==0; 
ic={f[0]==1,Derivative[1][f][0]==0}; 
DSolve[{ode,ic},f[t],t,IncludeSingularSolutions->True]
 
\begin{align*} f(t)&\to \frac {1}{2} e^{-t} (\sin (2 t)+2 \cos (2 t)) \end{align*}
Sympy. Time used: 0.105 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
f = Function("f") 
ode = Eq(5*f(t) + 2*Derivative(f(t), t) + Derivative(f(t), (t, 2)),0) 
ics = {f(0): 1, Subs(Derivative(f(t), t), t, 0): 0} 
dsolve(ode,func=f(t),ics=ics)
 
\[ f{\left (t \right )} = \left (\frac {\sin {\left (2 t \right )}}{2} + \cos {\left (2 t \right )}\right ) e^{- t} \]