# Why does integration by parts work?

Apr 4, 2018

Because of the product rule for differentiation.

#### Explanation:

Recall that the integral of a function is the function (family) that has that derivative.

$\int f \left(x\right) \mathrm{dx} = F \left(x\right) + C$ if and only if $F ' \left(x\right) = f \left(x\right)$.

That is to say

$\int F ' \left(x\right) \mathrm{dx} = F \left(x\right) + C$.

We know from our study of derivatives that

$\frac{d}{\mathrm{dx}} \left(f \left(x\right) g \left(x\right)\right) = f \left(x\right) g ' \left(x\right) + g \left(x\right) f ' \left(x\right)$.

Written in terms of differentials, we have:

$d \left(u v\right) = u \mathrm{dv} + v \mathrm{du}$.

So, with $u v$ in the role of $F \left(x\right)$ above, we have

$\int d \left(u v\right) = \int \left(u \mathrm{dv} + v \mathrm{du}\right)$.

So,

$u v = \int u \mathrm{dv} + \int v \mathrm{du}$.

And

$\int u \mathrm{dv} + \int v \mathrm{du} = u v$.

Consequently,

$\int u \mathrm{dv} = u v - \int v \mathrm{du}$.

Written using prime notation, we have

$\frac{d}{\mathrm{dx}} \left(f \left(x\right) g \left(x\right)\right) = f \left(x\right) g ' \left(x\right) + g \left(x\right) f ' \left(x\right)$.

$f \left(x\right) g \left(x\right) = \int f \left(x\right) g ' \left(x\right) \mathrm{dx} + \int g \left(x\right) f ' \left(x\right) \mathrm{dx}$

$\int f \left(x\right) g ' \left(x\right) \mathrm{dx} + \int g \left(x\right) f ' \left(x\right) \mathrm{dx} = f \left(x\right) g \left(x\right)$

$\int f \left(x\right) g ' \left(x\right) \mathrm{dx} = f \left(x\right) g \left(x\right) - \int g \left(x\right) f ' \left(x\right) \mathrm{dx}$