Integration by parts for multiple functions (n>2)

Let me preface this by saying that the things I’ll get into aren’t even remotely useful from a practical standpoint. This is basically for shits and giggles. They might be useful if you don’t have a calculator/computer and want to rip your hair out, however.

If you take/took BC Calculus or Calc II you’ve probably heard of the integration by parts technique. You can look at it as an inverse product rule that lets you take the integral of a product of two functions f(x)=u and g(x)=v. An example would be

\displaystyle \int x^2\sin{x}\ dx.

In the above case you would apply IBP twice to decrement the power of x^2 to a constant. If you continue on I’m just going to assume that you’ve seen this already and know how to do these kinds of problems.

What if we wanted to find the integral of a product of three functions, or four, or n? Sometimes such an integral might not be expressed in terms of elementary functions, but there’s probably an approximation out there using a computer. Sometimes the solution exists, however.

For two functions, the solution to integration by parts is

\displaystyle \int u\ dv = uv-\int v\ du.

This is derived by taking the integral on both sides of the product rule. So to find the n-function integration by parts formula, it makes sense to first derive the general n-function product rule.

Let’s start small with the product of three functions, uvw. Taking (uvw)' is equivalent to (uv)'w+(uv)w' by treating uv like a single function. Now we use the product rule again on uv to get

\displaystyle (uvw)'=u'vw+uv'w+uvw'.

This seems to make sense; for a product rule of three functions, there are three terms with each function having one and only one derivative for each term. Let’s see if this trend continues for four functions f_1 f_2 f_3 f_4. We can consider f_1 f_2 f_3 as an entire function and apply the product rule to get (f_1 f_2 f_3 f_4)' = (f_1 f_2 f_3)'f_4+(f_1 f_2 f_3)f_4'. But we already found what (f_1 f_2 f_3)' is! We just used different letters. So we now know that

\displaystyle (f_1 f_2 f_3 f_4)'=f_1'f_2f_3f_4+f_1f_2'f_3f_4+f_1f_2f_3'f_4+f_1f_2f_3f_4'.

Our pattern is now confirmed! We can continue like this on towards infinity, since if we do it this way we have a formula for an (n-1)-function product rule that we can apply towards the n-function product rule. The only small challenge is formulating this pattern concisely. Using a combination of pi and sigma notation, we can state the following proposition.

Proposition 1 (General product rule). Let f_1, f_2, \cdots, f_n be n different differentiable functions of x. Then

\displaystyle \frac{d}{dx}\prod_{i=1}^{n}f_i = \sum_{i=1}^{n}\frac{f_i'}{f_i}\prod_{j=1}^{n}f_j.

Now that we have the general product rule, we just have to take the integral of both sides with respect to x to get the general integration by parts formula. Doing so, we get

\displaystyle \int\prod_{i=1}^{n}f_i = \int\sum_{i=1}^{n}\frac{f_i'}{f_i}\prod_{j=1}^{n}f_j\ dx.

Although this is technically a valid formulation of the general IBP formula, I claim that integral signs are interchangeable, that is,

\displaystyle \int\sum_{i=1}^{n}f_i\ dx = \sum_{i=1}^{n}\int f_i\ dx.

This is due to the sum rule of integration: \int(f+g)\ dx=\int f\ dx + \int g\ dx.

Proposition 2 (General integration by parts). Let f_1, f_2, \cdots, f_n be n different continuous and differentiable functions of x. Then integration by parts is given by

\displaystyle \prod_{i=1}^{n}f_i = \sum_{i=1}^{n}\int\frac{f_i'}{f_i}\prod_{j=1}^{n}f_j\ dx.

This isn’t in a ‘useable’ form per se yet since we need to expand that sum and product notation to actually apply it in an integration, but this is as clean as the theorem is going to get. To see IBP in its familiar form, we make the substitutions u_1=f_1(x), u_2=f_2(x),\cdots,u_n=f_n(x) to get

\displaystyle \prod_{i=1}^{n}u_i = \sum_{i=1}^{n}\int\frac{du_i}{u_i}\prod_{j=1}^{n}u_j.

Let’s see what this form looks like when n=3.

\displaystyle \prod_{i=1}^{3}u_i = \sum_{i=1}^{3}\int\frac{du_i}{u_i}\prod_{j=1}^{3}u_j

\displaystyle u_1 u_2 u_3 = \int\frac{du_1}{u_1}(u_1u_2u_3)+\int\frac{du_2}{u_2}(u_1u_2u_3)+\int\frac{du_3}{u_3}(u_1u_2u_3)

\displaystyle \int u_1 u_2\ du_3 = u_1u_2u_3 -\int u_2u_3\ du_1 - \int u_1u_3\ du_2.

This last form is finally something we can work with when trying to find, say, the fiendish integral

\displaystyle \int xe^x\cos{x}\ dx.

I’ll leave the work up to you if you so choose, but using the n=3 IBP formula I got a solution of

\displaystyle \int xe^x\cos{x}\ dx = \frac{e^x(x\cos{x}+(x-1)\sin{x})}{2}.

That’s all for now.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s