# How do you integrate int e^x cos ^2 x dx  using integration by parts?

Jun 7, 2016

$\frac{1}{10} {e}^{x} \cos 2 x + \frac{1}{5} {e}^{x} \sin 2 x + \frac{1}{2} {e}^{x} + C$

#### Explanation:

First, consider the identity $\cos 2 x = 2 {\cos}^{2} x - 1$. Use this identity to transform the integral

$\int \left({e}^{x} {\cos}^{2} x\right) \mathrm{dx}$

into the integral

$\int \frac{{e}^{x} \left(\cos 2 x + 1\right)}{2} \mathrm{dx} = \frac{1}{2} \int {e}^{x} \cos 2 x \mathrm{dx} + \frac{1}{2} \int {e}^{x} \mathrm{dx}$

Finding $\int {e}^{x} \mathrm{dx}$ is straightforward i.e. $\int {e}^{x} \mathrm{dx} = {e}^{x} + C$

We use integration by parts to find $\int {e}^{x} \cos 2 x \mathrm{dx}$. By LIATE, we integrate ${e}^{x}$ and differentiate $\cos 2 x$:

int (e^x cos 2x) dx = e^x cos 2x - int e^x (–2 sin 2x) dx = e^x cos 2x + 2 int (e^x sin 2x) dx = e^x cos 2x + 2[(e^x sin 2x)-int e^x (2 cos 2x) dx] = e^x cos 2x + 2e^x sin 2x-4 int (e^x cos 2x) dx

Thus,

$\int \left({e}^{x} \cos 2 x\right) \mathrm{dx} = {e}^{x} \cos 2 x + 2 {e}^{x} \sin 2 x - 4 \int \left({e}^{x} \cos 2 x\right) \mathrm{dx}$
$5 \int \left({e}^{x} \cos 2 x\right) \mathrm{dx} = {e}^{x} \cos 2 x + 2 {e}^{x} \sin 2 x \mathrm{dx}$
$\int \left({e}^{x} \cos 2 x\right) \mathrm{dx} = \frac{1}{5} {e}^{x} \cos 2 x + \frac{2}{5} {e}^{x} \sin 2 x \mathrm{dx}$

Therefore,

$\int \frac{{e}^{x} \left(\cos 2 x + 1\right)}{2} \mathrm{dx} = \frac{1}{2} \left(\frac{1}{5} {e}^{x} \cos 2 x + \frac{2}{5} {e}^{x} \sin 2 x\right) + \frac{1}{2} {e}^{x} + C = \frac{1}{10} {e}^{x} \cos 2 x + \frac{1}{5} {e}^{x} \sin 2 x + \frac{1}{2} {e}^{x} + C$