Integrating Products of Exponential and Trigonometric Functions
Integrating Products of Exponential and Trigonometric Functions
It had been a while since I last tackled an integral involving a product of an exponential and a trigonometric function, and I found myself stumbling over the calculation.
Here is a note on the method I used.
The integral I want to evaluate is
$$ \int{e^{at}\cos{(bt)}dt} $$
Back in high school, I solved this by performing integration by parts twice — the second application brings you back to the original form.
But integration by parts can get messy: fractions keep re-appearing and the signs flip back and forth.
Instead, this time I proceeded as follows.
Define
$$ u(t) = e^{at}\cos{(bt)} $$
$$ v(t) = e^{at}\sin{(bt)} $$
If we differentiate the vector $(u, v)^{\mathsf{T}}$, we get
$$ \frac{d}{dt} \begin{pmatrix}u \\ v \end{pmatrix} = \begin{pmatrix}a & -b \\ b & a \end{pmatrix} \begin{pmatrix}u \\ v \end{pmatrix} $$
This shows that differentiation acts as a linear transformation.
Because integration is the inverse operation of differentiation, integrating corresponds to multiplying by the inverse matrix:
$$ \int \begin{pmatrix}u \\ v \end{pmatrix}dt = \begin{pmatrix}a & -b \\ b & a \end{pmatrix}^{-1} \begin{pmatrix}u \\ v \end{pmatrix} = \frac{1}{a^2+b^2} \begin{pmatrix}a & b \\ -b & a \end{pmatrix} \begin{pmatrix}u \\ v \end{pmatrix} $$
omitting the constant of integration.
If “integration is the inverse of differentiation” feels hand-wavy, simply differentiate the right-hand side to verify that you recover the vector $(u, v)^{\mathsf T}$.
Because differentiation commutes with multiplication by a constant matrix, the check is straightforward.
Focusing on the first component, we arrive at
$$ \int{e^{at}\cos{(bt)}dt} = \frac{a}{a^2+b^2}e^{at}\cos{(bt)} + \frac{b}{a^2+b^2}e^{at}\sin{(bt)} $$
Of course, this is essentially the same as treating $u + iv$ via Euler’s formula.
Compared with carrying out integration by parts, this approach feels more transparent.