# How do you derive the formula for integration by parts?

May 30, 2017

The integration by parts formula is derived directly from the product rule for differentiability.

If $f$ and $g$ are continuously differentiable everywhere, then we can differentiate their product (using the product rule):

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

$\therefore \frac{d}{\mathrm{dx}} \left(f g\right) = f \setminus \frac{\mathrm{dg}}{\mathrm{dx}} + g \setminus \frac{\mathrm{df}}{\mathrm{dx}}$

$\therefore f \setminus \frac{\mathrm{dg}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(f g\right) - g \setminus \frac{\mathrm{df}}{\mathrm{dx}}$

Now simply integrate wrt $x$:

$\int \setminus f \setminus \frac{\mathrm{dg}}{\mathrm{dx}} \setminus \mathrm{dx} = \int \setminus \frac{d}{\mathrm{dx}} \left(f g\right) \setminus \mathrm{dx} - \int \setminus g \setminus \frac{\mathrm{df}}{\mathrm{dx}} \setminus \mathrm{dx}$

From which we get the IBP formula:

$\int \setminus f \setminus \frac{\mathrm{dg}}{\mathrm{dx}} \setminus \mathrm{dx} = f g - \int \setminus g \setminus \frac{\mathrm{df}}{\mathrm{dx}} \setminus \mathrm{dx}$