Repeated integration by parts of a definite integral

In a physics proof I've been following, the author claims that by using integration by parts on the LHS of the following equation n times, we get the RHS.

$$\int_a^b f^{(n)}(x)g(x) dx = (-1)^{(n)}\int_a^b f(x)g^{(n)}(x) dx$$

I've been staring at this for hours and still don't understand why this is true. How would I go about proving this?

• There must be some boundary conditions that make $\left.f^{(k)}(x)g^{(n-k)}(x)\right|_a^b=0$. – user137731 Nov 17 '15 at 2:21
• This statement is only true if a right combination of the function and its derivatives are zero at the boundaries . – Paul Nov 17 '15 at 2:21

This is true with the correct boundary conditions. The easiest proof is inductive.

Base case:

$$\int_a^b f'(x) g(x) \mathrm{d}x = fg|_a^b - \int_a^b f(x) g'(x)\mathrm{d}x$$ in which case your result is valid if $f(b)g(b) =f(a)g(a)$

Inductive step:

\begin{align} \int_a^b f^{(n+1)} g ~\mathrm{d}x&= f^{(n)} g|_a^b - \int_a^b f^{(n)} g' ~\mathrm{d}x \\ &\overset{(a)}= 0 - (-1)^n \int_a^b f (g')^{(n)}~\mathrm{d}x \\ &= (-1)^{n+1} \int_a^b f g^{(n+1)}~\mathrm{d}x \end{align}

where equality $(a)$ is due to the induction hypothesis.

The boundary conditions required are $f^{(k)}(b)g^{(n-k)} (b) = f^{(k)}(a)g^{(n-k)} (a)$ for all $k \in [0:n-1]$.