# What is integration by parts and why does it work?

Oct 27, 2015

Integration by parts is a method of calculating integrals (both definite and indefinite).

#### Explanation:

Integration by parts is based on a formula:

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

It is a method to change one integral to another which may be easier to calculate.

This method is based on the formula for the derivative of ptroduct of 2 functions:

$\left[f \left(x\right) \cdot g \left(x\right)\right] ' = f ' \left(x\right) \cdot g \left(x\right) + f \left(x\right) \cdot g ' \left(x\right)$

$f ' \left(x\right) \cdot g \left(x\right) = \left[f \left(x\right) \cdot g \left(x\right)\right] ' - f \left(x\right) \cdot g ' \left(x\right)$

Now if we integrate both sides of the equation we get:

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

As an example I will calculate $\int \ln x \mathrm{dx}$

$\int \ln x \mathrm{dx} = \int \left(x '\right) \cdot \ln x \mathrm{dx} = | \left(u = x , v = \ln x\right) , \left(u ' = 1 , v ' = \frac{1}{x}\right) |$

$= x \ln x - \int x \cdot \left(\ln x\right) ' \mathrm{dx} = x \ln x - \int x \cdot \frac{1}{x} \mathrm{dx} = x \ln x - \int 1 \mathrm{dx} = x \ln x - x + C$

In the example we changed an integral of $f \left(x\right) = \ln x$ to an easier integral of $g \left(x\right) = 1$

Oct 27, 2015

It works because of the product rule for derivatives and because integration is the inverse of differentiation.

#### Explanation:

The product rule tells us that

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

Using differentials, this says that:

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

more conveniently written

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

Now, Integrate both sides:

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

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

By the inverse relationship of differentiation and integration, we can simplify the left side to get:

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

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

And finally, subtracting $\int v \mathrm{du}$ from both sideswe get

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

Alternative Notations

Rather than using the dufferential notation shown above, others prefer to use:

$\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}$.

Still others write

$\int f \left(x\right) g \left(x\right) \mathrm{dx} = f \left(x\right) \int g \left(x\right) \mathrm{dx} - \int \left[\frac{d}{\mathrm{dx}} \left(f \left(x\right)\right) \int g \left(x\right) \mathrm{dx}\right]$

(Or something like that. I've seen the last one rarely.)