# Primitive of Exponential of a x by Cosine of b x

## Theorem

$\ds \int e^{a x} \cos b x \rd x = \frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2} + C$

## Proof 1

 $\ds \int e^{a x} \cos b x \rd x$ $=$ $\ds \frac {e^{a x} \cos b x} a + \frac b a \int e^{a x} \sin b x \rd x$ Primitive of $e^{a x} \cos b x$: Lemma $\ds$ $=$ $\ds \frac {e^{a x} \cos b x} a + \frac b a \paren {\frac {e^{a x} \sin b x} a - \frac b a \int e^{a x} \cos b x \rd x}$ Primitive of $e^{a x} \sin b x$: Lemma $\ds$ $=$ $\ds \frac {e^{a x} a \cos b x + e^{a x} b \sin b x} {a^2} - \frac {b^2} {a^2} \int e^{a x} \cos b x \rd x$ simplifying $\ds \leadsto \ \$ $\ds \paren {1 + \frac {b^2} {a^2} } \int e^{a x} \cos b x \rd x$ $=$ $\ds \frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2}$ simplifying $\ds \leadsto \ \$ $\ds \frac {a^2 + b^2} {a^2} \int e^{a x} \cos b x \rd x$ $=$ $\ds \frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2}$ common denominator $\ds \leadsto \ \$ $\ds \int e^{a x} \cos b x \rd x$ $=$ $\ds \frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2}$ multiplying by $\dfrac {a^2} {a^2 + b^2}$

$\blacksquare$

## Proof 2

 $\ds \int e^{a x} e^{i b x} \rd x$ $=$ $\ds i \int e^{a x} \sin b x \rd x + \int e^{a x} \cos b x \rd x$ Euler's Formula $\ds \leadsto \ \$ $\ds \int e^{a x} \cos b x \rd x$ $=$ $\ds \map \Re {\int e^{\paren {a + i b} x} \rd x}$ $\ds$ $=$ $\ds \map \Re {\frac {e^{\paren {a + i b} x} } {a + i b} } + C$ Primitive of Exponential of a x $\ds$ $=$ $\ds \map \Re {\frac {\paren {a - i b} e^{\paren {a + i b} x} } {a^2 + b^2} } + C$ multiplying through by $\dfrac {a - i b} {a - i b}$ $\ds$ $=$ $\ds \map \Re {\frac {i a e^{a x} \sin b x + a e^{a x} \cos b x - i b \paren {i e^{a x} \sin b x + e^{a x} \cos b x} } {a^2 + b^2} } + C$ Euler's Formula $\ds$ $=$ $\ds \map \Re {\frac {i \paren {a e^{a x} \sin b x - b e^{a x} \cos b x} + \paren {a e^{a x} \cos b x + b e^{a x} \sin b x} } { a^2 + b^2} } + C$ $\ds$ $=$ $\ds \frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2} + C$ isolating real part

$\blacksquare$

## Proof 3

Let $a, b, x \in \R$ be real numbers.

Suppose $a \ne 0 \ne b$.

Let:

$f_1 = \map \exp {a x} \map \cos {b x}$
$f_2 = \map \exp {a x} \map \sin {b x}$

Let $\map \CC \R$ denote the space of continuous real-valued functions.

Let $\struct {\map {\CC^1} \R, +, \, \cdot \,}_\R$ denote the vector space of continuously differentiable real-valued functions.

Let $S = \span \set {f_1, f_2} \subset \map {\CC^1} \R$ be a vector space.

Let $D : S \to S$ be the derivative with respect to $x$.

$\mathbf D = \begin{bmatrix} a & b \\ -b & a \end{bmatrix}$

and is invertible.

$\mathbf D^{-1} = \frac 1 {a^2 + b^2} \begin{bmatrix} a & -b \\ b & a \end{bmatrix}$

Then:

$\mathbf D^{-1} \begin{bmatrix} 1 \\ 0 \end {bmatrix} = \frac 1 {a^2 + b^2} \begin{bmatrix} a & -b \\ b & a \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \frac 1 {a^2 + b^2} \begin{bmatrix} a \\ b \end{bmatrix}$

Application of $\mathbf D$ on both sides on the left and writing out explicitly in terms of $f_1$ and $f_2$ yields:

$f_1 = \dfrac \d {\d x} \dfrac {a f_1 + b f_2} {a^2 + b^2}$
$\ds \int f_1 \rd x = \frac {a f_1 + b f_2} {a^2 + b^2} + C$

where $C$ is an arbitrary constant.

Substitute definitions of $f_1$ and $f_2$ to get the desired result.

$\blacksquare$