freeCodeCamp/guide/english/mathematics/deriving-integration-by-par.../index.md

5.8 KiB

title
Deriving Integration by Parts Formula

Deriving Integration by Parts Formula

Integration by parts is a very powerful method to evaluate integrals that is almost an immediate consequence of the product rule for derivatives. It gives an alternate expression for an integral of a product, though this alternate expression is not always simpler, and it can be something of an art to see how to apply the formula well.

Suppose we have two functions u(x) and v(x), both of which are continuously differentiable, that is, they are differentiable and their derivatives are continuous. Then

∫ u(x)v'(x) dx = u(x)v(x) - ∫ u'(x)v(x) dx,

and similarly for the definite integral on the interval [a,b]

ab u(x)v'(x) dx = [u(x)v(x)]ab - ∫ab u'(x)v(x) dx.

To see how this holds, we start with the familiar product rule,

[u(x)v(x)]' = u'(x)v(x) + u(x)v'(x).

Integrating both sides (with respect to x) gives

∫ [u(x)v(x)]' dx = ∫ u'(x)v(x) dx + ∫ u(x)v'(x) dx

and by the Fundamental Theorem of Calculus for the definite case, or simply the antiderivative in the indefinite case, this means

u(x)v(x) = ∫ u'(x)v(x) dx + ∫ u(x)v'(x) dx.

Rearranging yields the formula given above. Writing v'(x) dx = dv and u'(x) dx = du, we may rewrite the formula as

uv = ∫ v du + ∫ u dv

which is frequently the easier way to think about and use it.

Example

Suppose we wish to evalute the following integral

∫ xln(x) dx.

Then we have two obvious choices for our u(x) and v(x). Namely, either we use u = ln(x) and dv = x dx, or u = x and dv = ln(x) dx. If we use the first option, then du = 1/x dx and v = x2/2, so the integration by parts formula gives

∫ xln(x) dx = ln(x)x2/2 - ∫ x/2 dx

and the integral on the right hand side is simply equal to x2/4 + C. Thus, we have

∫ xln(x) dx = x2[ln(x) - 1/2] + C.

Note that, had we tried the other choice of u and dv, things do not turn out the same. Indeed, if we set u = x and dv = ln(x) dx we have du = dx and v = x(ln(x) -1) so that

∫ xln(x) dx = x2(ln(x) -1) - ∫ x(ln(x) - 1) dx,

and the integral on the right is (essentially) the same as what we wanted to simplify! So this choice doesn't just not work, it fails catastrophically. The choice of u and dv can work at times, but not in others.

(More) Difficult Example

Unlike the above example where one choice of u and dv work while the other doesn't, there are times where none of the available choice gives an integral easy to evaluate. However, integration by parts can give you a simplification that can be used to -- with more work -- evaluate the integral as desired. For example, consider the integral

∫ x2ex dx

We have four obvious choices for u and dv coming from choosing u to be x, x2, xe2 or ex. We will use u = x2 so that dv = ex dx. Then du = 2x dx and v = ex, so integration by parts gives

∫ x2ex dx = x2ex - ∫ 2xex dx.

The integral on the right hand side is not easy to evaluate as in the example above, but it is different from the first integral, so we can try to use integration by parts again and see what happens. This time we choose u = x and dv = ex dx so that

∫ xex dx = xex - ∫ ex dx = xex - ex.

Hence, putting both of these together gives

∫ x2ex dx = x2ex - 2(xex - ex) + C

which can be simplified to simply ex(x2 - 2x + 2) + C. Not so bad after all!

How to Choose u, dv

There is unfortunately no guarantee that integration by parts will always work. However, we see in the examples above that each application that helped took an integral with udv and return a "simpler" integral of vdu, so one can try to look for choices of u and dv for which v and du are simpler. In particular, you can try to choose u to simplify under differentiation (e.g., polynomials always get smaller in degree when differentiated) while trying to choose v to not get more complex under itegration (e.g., ∫ ex dx = ex).

A general rule is the LIATE rule, that when your integral contains

  • Logarithmic functions
  • Inverse trigonometric functions
  • Algebraic functions
  • Trigonometric functions
  • Exponential functions

you try to pick u to be whichever function comes first and dv whichever function comes last on the list.

This is, however, just a rule of thumb. At times the ILATE rule is more appropriate, and some other times you simply need to choose differently. At times no choice will work, for example

∫ ex2 dx.

Generalizations

The above only discussed integration by parts for real valued functions of one variables, however similar formulas exist for multiple real variables, complex variables and many more theories of integration.