structural:scholar_edition
Exponentials and trigonometric functions

An example commonly used to examine the workings of integration by parts is

I = ∫ e x cos (x) d x. {\displaystyle I=\int e^{x}\cos(x)\,dx.}

Here, integration by parts is performed twice. First let

u = cos (x) ⇒ d u = − sin (x) d x d v = e x d x ⇒ v = ∫ e x d x = e x {\displaystyle {\begin{alignedat}{3}u&=\cos(x)\ &\Rightarrow \ &&du&=-\sin(x)\,dx\\dv&=e^{x}\,dx\ &\Rightarrow \ &&v&=\int e^{x}\,dx=e^{x}\end{alignedat}}}

then:

∫ e x cos (x) d x = e x cos (x) + ∫ e x sin (x) d x. {\displaystyle \int e^{x}\cos(x)\,dx=e^{x}\cos(x)+\int e^{x}\sin(x)\,dx.}

Now, to evaluate the remaining integral, we use integration by parts again, with:

u = sin (x) ⇒ d u = cos (x) d x d v = e x d x ⇒ v = ∫ e x d x = e x. {\displaystyle {\begin{alignedat}{3}u&=\sin(x)\ &\Rightarrow \ &&du&=\cos(x)\,dx\\dv&=e^{x}\,dx\,&\Rightarrow \ &&v&=\int e^{x}\,dx=e^{x}.\end{alignedat}}}

Then:

∫ e x sin (x) d x = e x sin (x) − ∫ e x cos (x) d x. {\displaystyle \int e^{x}\sin(x)\,dx=e^{x}\sin(x)-\int e^{x}\cos(x)\,dx.}

Putting these together,

∫ e x cos (x) d x = e x cos (x) + e x sin (x) − ∫ e x cos (x) d x. {\displaystyle \int e^{x}\cos(x)\,dx=e^{x}\cos(x)+e^{x}\sin(x)-\int e^{x}\cos(x)\,dx.}

The same integral shows up on both sides of this equation. The integral can simply be added to both sides to get

2 ∫ e x cos (x) d x = e x + C, {\displaystyle 2\int e^{x}\cos(x)\,dx=e^{x}{\bigl }+C,}

which rearranges to

∫ e x cos (x) d x = 1 2 e x + C ′ {\displaystyle \int e^{x}\cos(x)\,dx={\frac {1}{2}}e^{x}{\bigl }+C'}

where again C {\displaystyle C} (and C ′ = C 2 {\displaystyle C'={\frac {C}{2}}}) is a constant of integration.

A similar method is used to find the integral of secant cubed.