Difference between revisions of "Integration by parts"

ORIGINAL FULL PAGE: Integration by parts
STUDY THE TOPIC AT MULTIPLE LEVELS:
ALSO CHECK OUT: Practical tips on the topic |Quiz (multiple choice questions to test your understanding) |Page with videos on the topic, both embedded and linked to
View other integration rules

Statement

Statement in multiple versions

Version type Statement
Indefinite integral in function notation Suppose $F$ and $g$ are continuous functions such that $F$ is a differentiable function and we want to integrate $F(x)g(x)$. Suppose $G$ is an antiderivative for $g$ and $f = F'$. Then we have:
$\int F(x)g(x) \, dx = F(x)G(x) - \int f(x)G(x) \, dx$
Definite integral in function notation Suppose $F$ and $g$ are continuous functions on a closed interval $[a,b]$ such that $F$ is a differentiable function at all points of $[a,b]$ and we want to integrate $F(x)g(x)$. Suppose $G$ is an antiderivative for $g$ and $f$ is the derivative $F'$. Then, we have:
$\int_a^b F(x)g(x) \, dx = [F(x)G(x)]_a^b - \int_a^b f(x)G(x) \, dx$
The part $[F(x)G(x)]_a^b$ is shorthand for $F(b)G(b) - F(a)G(a)$, in keeping with the standard evaluate between limits notation used for definite integrals.
Indefinite integral in dependent-independent variable notation Suppose $u,v$ are variables denoting functions of $x$. Then, we have:
$\int u \, dv = uv - \int v \, du$
More explicitly:
$\int u \frac{dv}{dx} \, dx = uv - \int v \frac{du}{dx} \, dx$
Compared with the notation of the preceding version, $u = F(x)$, $du/dx=f(x)$, $dv/dx = g(x)$, and $v = G(x)$.
Verbal version The integral of a product of two functions is the first function times the integral of the second function minus the integral of (the derivative of the first function times the integral of the second function).

Associated jargon

The function $F$ in the function notation (or the variable $u$ in in the variable notation) is termed the part to differentiate. The function $g$ in the function notation (which is $dv/dx$ in the variable notation) is termed the part to integrate.

As a process

For further information, refer: Practical:Integration by parts

We can think of integration by parts overall as a five- or six-step process. The really hard discretionary parts (i.e., the parts that are not purely procedural but require decision-making) are Steps (1) and (2):

1. Identify the function being integrated as a product of two functions
2. Figure out which is the part to differentiate and which is the part to integrate
3. Determine the antiderivative of the part to integrate and the derivative of the part to differentiate
4. Apply integration by parts
5. Now, do the second integral

Basic procedural observations

Integration by parts essentially reverses the product rule for differentiation applied to $F(x)G(x)$ (or $uv$). proof section
Solving a problem through a single application of integration by parts usually involves two integrations -- one to find the antiderivative $G$ for $g$ (which in the $u-v$ notation is equivalent to finding $v$ given $dv/dx$) and then doing the right side integration of $f(x)G(x)$ (or $v\frac{du}{dx}$). Note that:
(1) For the first integration (the one involving finding $G$ or $v$), we just need to find one antiderivative and we do not put a $+C$ or try to evaluate between limits.
(2) On the other hand, at the end of the second integration (the integration of $f(x)G(x)$ or $v\frac{du}{dx}$), we do put a $+C$ (for indefinite integration) or evaluate between limits (for definite integration).
See the section choice of antiderivative does not matter. For more details, see choice of antiderivative does not matter for integration by parts
The key way that the original integral $\int F(x)g(x) \, dx$ (or $\int u \frac{dv}{dx} \, dx$) and the new integral $\int f(x)G(x) \, dx$ (or $\int v \frac{du}{dx} \, dx$) differ is that in the new integral, one part has been differentiated and the other part has been integrated. The section equivalence of integration problems. For more detailed information, see equivalence of integration problems arising from integration by parts

Variations

Note that the definite integral version can be relaxed somewhat in the following senses:

Variation name Nature of modification
One-sided differentiability at endpoints At the endpoints, it is sufficient to require the appropriate one-sided differentiability and take the corresponding one-sided derivative. In symbols, if $F$ is differentiable on $(a,b)$, right differentiable at $a$, and left differentiable at $b$, we can take $f$ to equal $F'$ on $(a,b)$, the right hand derivative at $a$, and the left hand derivative at $b$.
Improper integrals Integration by parts also works for improper integrals, provided the appropriate limits make sense to compute. Improper integrals include the situation where one or both the limits of integration is infinite, or where the function is infinite or undefined at one or both of the endpoints of integration or somewhere within the domain of integration.

Key observations

Choice of antiderivative does not matter

For further information, refer: choice of antiderivative does not matter for integration by parts

When we use integration by parts to try to figure out:

$\int F(x) g(x) \, dx$

one of the steps involves finding an antiderivative $G$ for $g$. Integration by parts works for any choice of antiderivative. However, this still raises the question: are some choices of antiderivatives better than others, as far as the effect on the subsequent problem-solving is concerned? The answer is roughly no -- the tractability of the subsequent integration problem ($\int F'(x)G(x) \, dx$) is independent of the specific choice of antiderivative. There are, however, some minor points to note:

• Some antiderivatives do look shorter than others, and it's better to choose them. For instance, when picking an antiderivative for $\cos x$, it is better to pick $\sin x$ than $32 + \sin x$.
• In some definite integral cases, we may prefer to choose an antiderivative that is zero at one or both the endpoints of evaluation. This makes subsequent evaluation easy.

Equivalence of integration problems

For further information, refer: equivalence of integration problems arising from integration by parts

Integration by parts tells us the following:

DIFFERENTIATE ONE PART, INTEGRATE THE OTHER PART OF THE PRODUCT: Integrating a product of two functions is equivalent to integrating a new product where we have differentiated one of the functions and integrated the other.

In symbols, what this means is that, if $F' = f$ and $G' = g$, the following two integration problems are equivalent:

$\int F(x) g(x) \, dx \leftrightarrow \int f(x)G(x) \, dx$

In the $u-v$ notation, this would read as:

$\int u \frac{dv}{dx} \, dx \leftrightarrow \int v \frac{du}{dx} \, dx$

Note that the integrals themselves are not equal -- the precise relation is given by the integration by parts formula, which also has a $F(x)G(x)$ term and a minus sign. What we're saying here is that the integration problems are equivalent -- a strategy for doing one integration gives a strategy for doing the other. In other words, if we know how to do one of the integrations, we know how to do the other.

Repeated use of integration by parts

For further information, refer: repeated use of integration by parts

Integration by parts can be used multiple times, i.e., the new integration that we obtain from an application of integration by parts can again be subjected to integration by parts. However, we need to make sure that we avoid the circular trap.

The typical repeated application of integration by parts looks like:

$F(x)g(x) \to F'(x)\int g(x) \, dx \to F''(x) \int \int g(x) \, dx \, dx \to \dots$

In words, we keep differentiating the part obtained by differentiation and keep integrating the part obtained by integration. Note that after $k$ applications of the procedure, we would have a product of the $k^{th}$ derivative of $F$ and a $k^{th}$ antiderivative of $g$.

Note that this is simply a conceptual reduction, not an equality of expressions.

Circular trap

For further information, refer: circular trap with integration by parts

AVOID THE CIRCULAR TRAP: When using integration by parts a second time, make sure you don't choose as the part to integrate the thing you got by differentiating the part to differentiate from the original product. Otherwise, you get in a circular trap and don't get any new information. The most typical application of integration by parts a second time is if you choose to differentiate again the expression that you already obtained through differentiation the first time

Consider an integration of the form:

$\int F(x) g(x) \, dx$

where $G$ is an antiderivative for $g$. Then:

$\int F(x) g(x) \, dx = F(x)G(x) - \int F'(x)G(x) \, dx$

Suppose that, for the new integral, we choose $G$ as the part to differentiate and $F'$ as the part to integrate. The expression then simplifies to:

$\int F(x) g(x) \, dx = F(x)G(x) - [G(x)F(x) - \int g(x)F(x) \, dx]$

Simplifying, we get:

$\int F(x) g(x) \, dx = \int F(x)g(x) \, dx$

In other words, we ended up with the original expression, and obtained no new information in the process. Another way of saying this is that we went in circles, i.e., went back along the path we came from, hence did not make any progress.

Integration by parts is not the exclusive strategy for products

The first thing to check for when trying to integrate a product of functions is integration by u-substitution, particularly if one of the factors in the product looks like a composite of two functions. Integration by parts should be used if integration by u-substitution does not make sense, which usually happens when it is a product of two apparently unrelated functions.

Also, for trigonometric products, check out integration of product of sinusoidal functions.

Choosing the parts to integrate and differentiate

Comparing the complexity effects of differentiation and integration on important classes of functions

Recall that for integration by parts, we are trying to integrate a product and in order to do that we differentiate one of the factors and integrate the other factor. Given a product, we need to choose which factor is the part to differentiate and which factor is the part to integrate.

We first consider the basic classes of functions:

Type of function How good is it as the part to differentiate and why? How good is it as the part to integrate and why?
logarithmic function, inverse trigonometric function OR composite of logarithmic or inverse trigonometric function with a polynomial (polynomial as the inner step of the composition, logarithmic or inverse trigonometric as outer step) excellent to differentiate, because differentiating this kind of function gets us into the domain of algebraic functions (rational functions and radical-based expressions) which are simpler. terrible as the part to integrate, because there is no general formula for integrating these functions, and the antiderivatives are as complicated, or more.
polynomials good to differentiate, because differentiating a polynomial makes it simpler (reduces the degree). If a polynomial is differentiated enough times, it becomes zero. not terrible to integrate, but integrating a polynomial is costly (in terms of degree gain) and should be done only if there is significant reduction in complexity on the other side.
basic trigonometric and exponential functions (sin, cos, exp, sinh, cosh, or expressions that are polynomial in these) okay to differentiate; there is usually no gain or reduction in complexity okay to integrate; there is usually no gain or reduction in complexity

Here are some more convoluted function types:

Type of function How good is it as the part to differentiate and why? How good is it as the part to integrate and why?
other algebraic functions (rational functions, radical-based expressions) differentiating does not usually make them simpler, but we still stay within algebraic functions. some have an algebraic antiderivative (such as powers of $x$ other than $x^{-1}$) and are reasonable to integrate.
Others, such as $1/x$ and $1/(x^2 + 1)$, have antiderivatives that are of the logarithmic or inverse trigonometric type. These are terrible to choose as the part to integrate.
In many cases, one integration is fine but repeated integration eventually leads to a situation where we exit the algebraic domain.
more convoluted trigonometric functions (such as tan, sec, and other expressions that are non-polynomial rational functions if expressed purely in terms of sine and cosine). Analogously, non-polynomial rational functions of hyperbolic sine and hyperbolic cosine differentiation may make the expressions more complicated, but they stay within the trigonometric and exponential domain in some cases, integration keeps the function within the trigonometric or exponential domain. These are reasonable to integrate
Others have antiderivatives that involve logarithms (such as the tangent function, secant function, etc.) and are terrible to integrate.
In many cases, one integration is fine but repeated integration eventually leads to a situation where we land up with a logarithmic function or get something we don't know how to integrate.

General heuristic: ILATE rule

The upshot is that, for the choice of the part to differentiate, we have the following hierarchy:

1. Inverse trigonometric functions and logarithmic functions are the most preferable to differentiate
2. Algebraic functions (usually polynomials, but also rational functions and radical-based expressions)
3. Trigonometric and exponential functions (both the basic and the convoluted ones) are the most preferable to integrate

This hierarchy is often remembered by means of the mnemonic ILATE (standing for Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential). Sometimes, the mnemonic LIATE is used instead.

It should be remembered that there is no real precedence ordering between inverse trigonometric and logarithmic functions, and there is no real precedence ordering between trigonometric and exponential functions. However, it may still be good to adopt a consistent rule of precedence between trigonometric and exponential functions in order to avoid the circular trap.

Standard strategies for products and composites

Product strategies: simple cases

For further information, refer: Practical:Integration by parts#Products and typical strategies

Product type Preliminary thoughts Strategy for this product type Examples
polynomial function times basic trigonometric or exponential function (such as sin, cos, exp, cosh, sinh, or a polynomial in such expressions) The polynomial function can be differentiated, and repeated differentiation keeps making it simpler and simpler until it disappears. The sine or cosine function or exponential function, upon integration, does not get more complicated, and so can be integrated repeatedly. Take the polynomial function as the part to differentiate, and keep using integration by parts repeatedly till the polynomial disappears. Trig: $x \cos x, x \sin x, x^2 \cos x$ (see here for worked out examples)
Exp: $xe^x, x^2e^x, x \cosh x, x\sinh x$ (see here for worked out examples)
inverse trigonometric function or logarithmic function (or composite of such a function with a polynomial function) times polynomial function (the polynomial function could just be the function $1$, which is invisible). The polynomial function can easily be both differentiated and integrated. The inverse trigonometric or logarithmic function can be differentiated, bringing it into the algebraic domain. Choose the inverse trigonometric function or logarithmic function as the part to differentiate. Simple products:$\ln x, x \ln x, \arctan x, x \arctan x, \arcsin x$ (see here for worked out examples)
Products involving composites: $\ln(x^2 + 1), x\ln(x^3 + 1), x \arctan(x^3 - x)$
trigonometric function times exponential function OR product of trigonometric functions or power of a trigonometric function that can be treated as a product (and other techniques such as integration by u-substitution don't seem to solve the problem completely) both functions are easy to differentiate and to integrate, with the complexity remaining the same. We need to use the recursive version of integration by parts. $\sin^2x, e^x \cos x$
The function $\sec^3x$ can also be done using a similar method, though it falls outside the basic trigonometric function products.

Recursive version of integration by parts

For further information, refer: recursive version of integration by parts

Here, we use integration by parts (one or more times) and combine that with some trigonometric identities or algebraic manipulations to see the original integrand re-appear unexpectedly. We then choose an antiderivative $I$ so that the linear equation holds without any additive constants, and solve the linear equation for $I$ to get the antiderivative $I$. For examples, see sec^3#Integration and sin^2#Integration.

Product strategies: complicated cases

Product type Preliminary thoughts Strategy for this product type Examples
polynomial function times (trigonometric function that is a non-polynomial rational function in sin and cos) OR (exponential function that is a non-polynomial rational function in sinh and cosh) The polynomial function can be differentiated, and repeated differentiation keeps making it simpler and simpler until it disappears. The other piece is a gamble. The hope is that it can be integrated at least as many times as is needed to make the polynomial go to zero Choose the polynomial as the part to differentiate. Repeat. If the polynomial has degree $d$, the strategy works if the trigonometric/exponential piece can be integrated $d + 1$ times. Where it works: $x\tan^2x$ (because $\tan^2$ can be integrated twice within elementary functions)
Where it doesn't work: $x \tan x$ (because $\tan$ cannot be integrated twice within elementary functions)
inverse trigonometric function or logarithmic function (or composite of such a function with a polynomial function) times non-polynomial algebraic function The inverse trigonometric or logarithmic function, upon differentiation, lands in the algebraic domain. The hope is that the algebraic function can be integrated within the algebraic domain. If the algebraic function can be integrated within the algebraic domain, then it works to pick the inverse trigonometric or logarithmic function as the part to differentiate, and the algebraic function as the part to integrate. where it works: $(\arctan x)/x^2$ (because $1/x^2$ has an antiderivative $-1/x$ that is a rational function), $x \ln x/(x^2 + 1)^2$ (because $x/(x^2 + 1)^2$ has an antiderivative that is a rational function)
where it doesn't work: $(\arctan x)/x$ (because the antiderivative of $1/x$ is not a rational function), $(\ln x)/(x^2 + 1)$ (because the antiderivative of $1/(x^2 + 1)$ is not a rational function)

Integration by parts for composite functions

For some composite functions, we can try using integration by parts directly. Alternatively we can use integration by parts in two steps: (i) do a $u$-substitution that converts it to a product, and (ii) use the integration by parts technique for products. We discuss two typical transformations of this sort:

Original integration How you'd do this directly Choice of $u$, if using $u$-substitution New integration
$\int f(\ln x) \, dx$ Take 1 as the part to integrate. Keep proceeding, taking the polynomial as the part to integrate at each stage. If $f$ is polynomial, the problem solves directly in finitely many steps. If $f$ is trigonometric, use the recursive version of integration by parts. $u = \ln x$, so $x = e^u$ and $dx = e^u \, du$ $\int f(u) e^u \, du$. This is a product of an exponential function and the function $f$. We can now use the appropriate technique: if $f$ is polynomial, take $f$ as the part to differentiate and repeat till it goes away; if $f$ is trigonometric, use the recursive version of integration by parts.
$\int f(x^{1/n}) \, dx$, $n$ a positive integer Take $x^{1 - (1/n)}$ as the part to differentiate and $x^{(1/n) - 1}f(x^{1/n})$ as the part to integrate. Keep making similar tricky choices as the problem simplifies. $u = x^{1/n}$, so $x = u^n$, and $dx = nu^{n-1} \, du$ $\int nf(u)u^{n-1} \, du$. This is the product of a polynomial function and the function $f$. We can now use the appropriate technique: if $f$ is a polynomial, then it is just a polynomial integration. If $f$ is inverse trigonometric or logarithmic, take that as the part to differentiate. If $f$ is trigonometric or exponential, take $u^{n-1}$ as the part to differentiate and differentiate repeatedly.
$\int f(\arcsin x) \, dx$ (similar technique works for $f(\arccos x)$). Take 1 as the part to integrate. Keep proceeding, taking the algebraic function as the part to integrate at each stage. If $f$ is polynomial, the problem solves directly in finitely many steps. If $f$ is exponential, you'll need the recursive version of integration by parts. $u = \arcsin x$, so $x = \sin u$, and $dx = \cos u \, du$. $\int f(u) \cos u \, du$. This is the product of the cosine function and $f$. We can now use the appropriate technique: if $f$ is polynomial, take $f$ as the part to differentiate and repeat till it goes away; if $f$ is exponential, use the recursive version of integration by parts.

Integration by parts for composites-cum-products

There are some non-traditional formats for integration by parts. The approach suggested below is to use a $u$-substitution to convert it to a more traditional format. However, this is not necessary and the problem can be tackled directly. However, if tackling the problem directly, one needs to think more carefully about the choice of part to differentiate and part to integrate.

Original integration How you'd do this directly Choice of $u$ if using $u$-substitution New integration Examples
$\int f(\ln x) g(x) \, dx$, $g$ a polynomial Take $f(\ln x)$ as the part to differentiate, $g(x)$ as part to integrate $u = \ln x$ $\int f(u)g(e^u)e^u \, du$. $x(\ln x)^2, x^2 \sin(\ln x)$
$\int x^{km - 1} f(x^m) \, dx$, with $f$ trigonometric or exponential Take $x^{(k-1)m}$ as the part to differentiate, $x^{m-1}f(x^m)$ as the part to integrate $u = x^m$ $\frac{1}{m} \int u^{k-1} f(u) \, du$ $x^3e^{x^2}, x^5 \sin (x^3), x^{23}\cos(x^4)$

Offbeat integration problems and strategies

Integration by parts for triple products: multiple layers

Integration by parts can be applied in some cases for products of three functions, where the functions are respectively polynomial, trigonometric, and exponential. There are many different ways the solution may be presented. Here's one:

• Take the polynomial part as the part to differentiate and the product of the trigonometric and exponential as the part to integrate.
• To do the integration of the product of the trigonometric and exponential, use the recursive version of integration by parts (but don't put a $+C$, because the goal is just to find one antiderivative) and plug into the integration by parts.
• Keep repeating the above process (where you'd need to do the recursive version of integration by parts strategy every time you apply integration by parts) until the polynomial part goes away.

An example is $\int x \cos x e^x \, dx$.

Direct pattern matching sums of products and using integration by parts on part of the expression

In some cases, we can directly pattern match and solve an integration by figuring out the product rule it came from. In slight variants of these, when we have a sum of products, here's what we do:

• We consider one of the products in the sum. We start simplifying that using integration by parts.
• We may notice that the other piece pops up in the integration by parts.

For instance, consider:

$\int \frac{\sin x}{x} + (\cos x)(\ln x) \,dx$

If we start doing $\int (\cos x)(\ln x) \, dx$ by parts taking the logarithmic function as the part to differentiate, we will see that the other integrand $\int \frac{\sin x}{x} \, dx$ appears in the integration expression and cancels:

$\int (\cos x)(\ln x) \, dx = (\ln x)(\sin x) - \int \frac{\sin x}{x} \, dx$

So:

$\int \frac{\sin x}{x} + (\cos x)(\ln x) \,dx = (\ln x)(\sin x) + C$

Alternatively, we could directly solve this integral by reverse-engineering the product rule for differentiation on $(\sin x)(\ln x)$.

Some general pattern matches are below:

• $e^x(p(x) + p'(x))$ integrates to $e^xp(x)$
• $\sin x p'(x) + \cos x p(x)$ integrates to $(\sin x)p(x)$
• $\cos x p'(x) - \sin x p(x)$ integrates to $(\cos x)p(x)$

Proof

The proof uses the product rule for differentiation.

Indefinite integration version in terms of the product rule for differentiation

We follow the function notation. Suppose $F,G$ are two functions of one variable with $G' = g$. We then have that:

$\! \frac{d}{dx}[F(x)G(x)] = F'(x)G(x) + F(x)G'(x)$

If we apply the indefinite integral to both sides, we get:

$\! F(x)G(x) = \int F'(x)G(x) \, dx + \int F(x)G'(x) \, dx$

Note the slight abuse of notation: the right side is defined only up to additive constants, whereas the left side is defined exactly. However, this is not an issue.

Rearranging:

$\int F(x)G'(x) \, dx = F(x)G(x) - \int F'(x)G(x) \, dx$

Now using $G' = g$, we get:

$\int F(x) g(x) \, dx = F(x)G(x) - \int F'(x)G(x) \, dx$

If we further let $F' = f$ (for expressive symmetry) the above becomes:

$\int F(x) g(x) \, dx = F(x)G(x) - \int f(x)G(x) \, dx$

Definite integration version in terms of the product rule for differentiation

$\! \frac{d}{dx}[F(x)G(x)] = F'(x)G(x) + F(x)G'(x)$

Integrate both sides over the interval $[a,b]$:

$\! \int_a^b \frac{d}{dx}[F(x)G(x)] \, dx = \int_a^b F'(x)G(x) \, dx + \int_a^b F(x)G'(x) \, dx$

By the fundamental theorem of calculus, the left side becomes $[F(x)G(x)]_a^b$, so we get:

$\! [F(x)G(x)]_a^b = \int_a^b F'(x)G(x) \, dx + \int_a^b F(x)G'(x) \, dx$

Rearranging, we get:

$\int_a^b F(x)G'(x) \, dx = [F(x)G(x)]_a^b - \int_a^b F'(x)G(x) \, dx$

Now using $G' = g$, we get:

$\int_a^b F(x) g(x) \, dx = [F(x)G(x)]_a^b - \int_a^b F'(x)G(x) \, dx$

If we further let $F' = f$ (for expressive symmetry) the above becomes:

$\int_a^b F(x) g(x) \, dx = [F(x)G(x)]_a^b - \int_a^b f(x)G(x) \, dx$