# How do you integrate inte^(3x)cos^2xdx using integration by parts?

Jul 22, 2016

$\int {e}^{3 x} {\cos}^{2} x \mathrm{dx} = {e}^{3 x} / 78 \left(9 \cos \left(2 x\right) + 6 \sin \left(2 x\right) + 13\right)$

#### Explanation:

This integral can be easily solved using a consequence of Moivre's identity

$\frac{{e}^{i x} + {e}^{- i x}}{2} = \cos \left(x\right)$
$\frac{{e}^{i x} - {e}^{- i x}}{2 i} = \sin \left(x\right)$

because

${\cos}^{2} x \equiv \frac{{e}^{2 i x} + 2 + {e}^{- 2 i x}}{4}$

then

$\int {e}^{3 x} {\cos}^{2} x \mathrm{dx} \equiv \frac{1}{4} \int \left({e}^{3 x + 2 i x} + 2 {e}^{3 x} + {e}^{3 x - 2 i x}\right) \mathrm{dx}$

$= {e}^{3 x} / 4 \left(\frac{{e}^{2 i x}}{3 + 2 i} + \frac{2}{3} + {e}^{- 2 i x} / \left(3 - 2 i\right)\right)$
$= {e}^{3 x} / 4 \left(\frac{3 - 2 i}{13} {e}^{2 i x} + \frac{2}{3} + \frac{3 + 2 i}{13} {e}^{- 2 i x}\right)$
$= {e}^{3 x} \left(\frac{3}{26} \frac{{e}^{2 i x} + {e}^{- 2 i x}}{2} + \frac{1}{13} \frac{{e}^{2 i x} - {e}^{- 2 i x}}{2 i} + \frac{1}{6}\right)$
$= {e}^{3 x} / 78 \left(9 \cos \left(2 x\right) + 6 \sin \left(2 x\right) + 13\right)$