# Integrate e^xcosx dx by parts?

Apr 12, 2018

Let, $I = \int {e}^{x} \cos x \mathrm{dx}$

Integrating by parts,

$\int {e}^{x} \cos x \mathrm{dx} = I = \int \cos x d \left({e}^{x}\right) = {e}^{x} \cos x + \int {e}^{x} \sin x \mathrm{dx} + C$

Again integrating $\int {e}^{x} \sin x \mathrm{dx}$ by parts:

$I = {e}^{x} \cos x + {e}^{x} \sin x - \int {e}^{x} \cos x \mathrm{dx} + C$

$I = {e}^{x} \cos x + {e}^{x} \sin x - I + C$

$2 I = {e}^{x} \cos x + {e}^{x} \sin x + C$

$I = \frac{{e}^{x} \cos x + {e}^{x} \sin x}{2} + C$

$I = {e}^{x} / 2 \left(\cos x + \sin x\right) + C$

Apr 12, 2018

$\implies I = {e}^{x} / 2 \left(\cos x + \sin x\right) + c$

#### Explanation:

Here,

color(blue)(I=inte^xcosx dx...to(A)

$\text{Using"color(red)" Integration by Parts}$

i.e. $\int \left(u \cdot v\right) \mathrm{dx} = u \int v \mathrm{dx} - \int \left(u ' \int v \mathrm{dx}\right) \mathrm{dx}$

Let,, $u = \cos x \mathmr{and} v = {e}^{x} \implies u ' = - \sin x \mathmr{and} \int v \mathrm{dx} = {e}^{x}$

So,

$I = \cos x {e}^{x} - \int \left(\left(- \sin x\right) {e}^{x}\right) \mathrm{dx}$

$= {e}^{x} \cdot \cos x + \int \sin x {e}^{x} \mathrm{dx}$

Again $\text{using"color(red)" Integration by Parts}$

Take, $u = \sin x \mathmr{and} v = {e}^{x} \implies u ' = \cos x \mathmr{and} \int v \mathrm{dx} = {e}^{x}$

$\therefore I = {e}^{x} \cos x + \left[\sin x {e}^{x} - \textcolor{b l u e}{\int \cos x {e}^{x} \mathrm{dx}}\right] + c$

$\implies I = {e}^{x} \cos x + \sin x {e}^{x} - \textcolor{b l u e}{I} + c \ldots \to U s e . \left(A\right) a b o v e$

$\therefore I + I = {e}^{x} \cos x + {e}^{x} \sin x + c$

$\implies 2 I = {e}^{x} \left(\cos x + \sin x\right) + c$

$\implies I = {e}^{x} / 2 \left(\cos x + \sin x\right) + c$