Skip to content

Integration by Parts

In differential calculus, the product rule provides a formula for the derivative of a product of two differentiable functions \(u(x)\) and \(v(x)\):

\[\frac{d}{dx}[u(x)v(x)] = u(x)v'(x) + u'(x)v(x)\]

Integration by parts is simply the integral counterpart of this product rule.

Integrating both sides with respect to \(x\):

\[u(x)v(x) = \int u(x)v'(x)\,dx + \int u'(x)v(x)\,dx\]

Rearranging the terms yields:

\[\int u(x)v'(x)\,dx = u(x)v(x) - \int u'(x)v(x)\,dx\]

The Product Formula for Two Functions

Suppose we are given an integrand that is a product of two functions, \(f(x)g(x)\).

If we identify \(u(x) = f(x)\) and \(v'(x) = g(x)\) (so that \(v(x) = \int g(x)\,dx\)), the formula takes the practical form:

\[\int f(x)g(x)\,dx = f(x)\int g(x)\,dx - \int \left( f'(x) \int g(x)\,dx \right) dx\]

Because multiplication of real functions is commutative, \(f(x)g(x) = g(x)f(x)\). We could equally well assign the roles in reverse:

\[\int f(x)g(x)\,dx = g(x)\int f(x)\,dx - \int \left( g'(x) \int f(x)\,dx \right) dx\]

At first glance, this identity appears complicated: it replaces one unsolved integral with another integral.

However, the power of integration by parts lies in the fact that differentiation often simplifies a function (for example, lowering the power of a polynomial or converting an inverse trigonometric function into an algebraic fraction). If chosen strategically, the new integral on the right-hand side is substantially easier to evaluate than the original one.


Choosing Function I and Function II

To apply the formula systematically, we adopt a standard naming convention:

  • Function I (First Function): The function chosen to be differentiated.
  • Function II (Second Function): The function chosen to be integrated.

In words, the formula reads:

\[\int (\text{I} \cdot \text{II})\,dx = \text{I} \int \text{II}\,dx - \int \left( \frac{d}{dx}(\text{I}) \cdot \int \text{II}\,dx \right) dx\]
\[\text{Integral of Product} = (\text{First Function}) \times (\text{Integral of Second}) - \int [(\text{Derivative of First}) \times (\text{Integral of Second})]\,dx\]

The Logic Behind the Choice

The success of integration by parts hinges entirely on three practical conditions:

  1. The derivative of Function I must be simpler than Function I itself. For example, algebraic powers \(x^n\) reduce to \(n x^{n-1}\), while functions like \(\ln x\) and \(\tan^{-1} x\) lose their transcendental character and become simple rational functions.
  2. Function II must be integrable using known standard integration formulas. If we cannot integrate Function II in closed form, the formula cannot even get started.
  3. The resulting product \(\left( \frac{d}{dx}(\text{I}) \cdot \int \text{II}\,dx \right)\) must be easier to integrate than the original integrand \(\text{I} \cdot \text{II}\).

A Direct Comparison of Choices

Consider the integral:

\[I = \int x e^x\,dx\]

Here we have two factors: the algebraic factor \(x\) and the exponential factor \(e^x\).

Strategic Choice: Let \(\text{I} = x\) and \(\text{II} = e^x\).

Differentiating \(\text{I}\) gives \(\frac{d}{dx}(x) = 1\).

Integrating \(\text{II}\) gives \(\int e^x\,dx = e^x\).

Applying the formula:

\[I = x e^x - \int (1 \cdot e^x)\,dx = x e^x - e^x + C\]

The derivative of \(x\) eliminated the algebraic term entirely, reducing the problem to a standard elementary integral.

Unfavorable Choice: What if we had chosen \(\text{I} = e^x\) and \(\text{II} = x\)?

Differentiating \(\text{I}\) gives \(\frac{d}{dx}(e^x) = e^x\).

Integrating \(\text{II}\) gives \(\int x\,dx = \frac{x^2}{2}\).

Applying the formula:

\[I = e^x \cdot \frac{x^2}{2} - \int \frac{x^2}{2} e^x\,dx\]

Instead of simplifying the problem, this choice replaced \(\int x e^x\,dx\) with \(\frac{1}{2}\int x^2 e^x\,dx\)—an integral of strictly higher degree!

This contrast demonstrates why the choice of First and Second function cannot be arbitrary.


Example 1

Evaluate:

\[I = \int x \cos x\,dx\]

Solution:

Identify the two factors:

\[\text{I} = x \implies \frac{d}{dx}(x) = 1\]
\[\text{II} = \cos x \implies \int \cos x\,dx = \sin x\]

Applying the product formula:

\[I = x \int \cos x\,dx - \int \left( \frac{d}{dx}(x) \cdot \int \cos x\,dx \right) dx\]
\[I = x \sin x - \int (1 \cdot \sin x)\,dx\]
\[I = x \sin x - (-\cos x) + C\]
\[I = x \sin x + \cos x + C\]

Example 2

Evaluate:

\[I = \int x^2 e^x\,dx\]

Solution:

Here the algebraic factor is quadratic, \(x^2\). One differentiation will reduce it to linear (\(2x\)), and a second differentiation will reduce it to a constant. Thus, we apply integration by parts twice.

First Application:

Let:

\[\text{I} = x^2 \implies \frac{d}{dx}(x^2) = 2x\]
\[\text{II} = e^x \implies \int e^x\,dx = e^x\]

Applying the formula:

\[I = x^2 \int e^x\,dx - \int \left( \frac{d}{dx}(x^2) \cdot \int e^x\,dx \right) dx\]
\[I = x^2 e^x - \int 2x e^x\,dx = x^2 e^x - 2 \int x e^x\,dx\]

Second Application:

For the remaining integral \(\int x e^x\,dx\), let:

\[\text{I} = x \implies \frac{d}{dx}(x) = 1\]
\[\text{II} = e^x \implies \int e^x\,dx = e^x\]

Evaluating this integral:

\[\int x e^x\,dx = x e^x - \int (1 \cdot e^x)\,dx = x e^x - e^x\]

Substitute this back into \(I\):

\[I = x^2 e^x - 2(x e^x - e^x) + C\]
\[I = (x^2 - 2x + 2)e^x + C\]

The ILATE Preference Rule

To help select which function should serve as Function I (the function to differentiate), mathematicians use the mnemonic ILATE.

The letters represent five common families of functions, arranged in order of decreasing priority for being chosen as Function I:

Letter Function Family Representative Examples
I Inverse trigonometric \(\sin^{-1} x, \cos^{-1} x, \tan^{-1} x, \sec^{-1} x\)
L Logarithmic \(\ln x, \log_{10} x, \log_a(x + 1)\)
A Algebraic \(x^n, \sqrt{x}, ax + b, x^2 + 1\)
T Trigonometric \(\sin x, \cos x, \sec^2 x, \csc x\cot x\)
E Exponential \(e^x, a^x, 2^{3x}\)

Whichever factor appears earlier in the word ILATE is generally selected as Function I, while the remaining factor becomes Function II.

ILATE is a Rule of Thumb, Not a Law

It is essential to understand that ILATE is only a heuristic guide, not an absolute mathematical theorem. In several situations, strictly following ILATE is either impossible or counterproductive:

  1. Both factors belong to the same family: Consider \(\int \sec^3 x\,dx = \int \sec x \cdot \sec^2 x\,dx\). Both \(\sec x\) and \(\sec^2 x\) are trigonometric (T). ILATE offers no preference between them. Here, the choice is governed purely by integrability: \(\sec^2 x\) has an immediate standard antiderivative (\(\tan x\)), so \(\sec^2 x\) must be Function II, leaving \(\sec x\) as Function I.

  2. Algebraic grouping inside composite expressions: In an integral such as \(\int x^3 e^{x^2}\,dx\), ILATE would suggest setting Function I as \(x^3\) and Function II as \(e^{x^2}\). But \(e^{x^2}\) has no elementary antiderivative! Instead, we decompose \(x^3\) as \(x^2 \cdot x\) and group \(x\) with \(e^{x^2}\), choosing \(\text{I} = x^2\) and \(\text{II} = x e^{x^2}\) (which integrates cleanly to \(\frac{1}{2}e^{x^2}\)).

  3. Denominators containing squares of linear terms: In \(\int \frac{x e^x}{(x + 1)^2}\,dx\), the factor \(\frac{1}{(x + 1)^2}\) is algebraic, yet it must be selected as Function II because its integral \(-\frac{1}{x + 1}\) simplifies the subsequent step.


Integrating Single Functions via a Dummy Factor of 1

A striking application of integration by parts occurs when the integrand consists of a single function whose derivative is known, but whose antiderivative is not elementary—such as \(\ln x\), \(\sin^{-1} x\), or \(\tan^{-1} x\).

In such cases, we introduce the constant \(1\) as an algebraic factor:

\[\int f(x)\,dx = \int f(x) \cdot 1\,dx\]

According to ILATE, we set:

  • Function I: \(f(x)\) (Inverse trigonometric or Logarithmic)
  • Function II: \(1\) (Algebraic, since \(1 = x^0\))

Integrating Function II gives \(\int 1\,dx = x\).


Example 3

Evaluate:

\[I = \int \ln x\,dx\]

Solution:

Write the integrand as \(\ln x \cdot 1\):

\[\text{I} = \ln x \implies \frac{d}{dx}(\ln x) = \frac{1}{x}\]
\[\text{II} = 1 \implies \int 1\,dx = x\]

Applying the formula:

\[I = (\ln x)(x) - \int \left( \frac{1}{x} \cdot x \right) dx\]
\[I = x \ln x - \int 1\,dx\]
\[I = x \ln x - x + C\]

Example 4

Evaluate:

\[I = \int \sin^{-1} x\,dx\]

Solution:

Write the integral as \(\int (\sin^{-1} x \cdot 1)\,dx\):

\[\text{I} = \sin^{-1} x \implies \frac{d}{dx}(\sin^{-1} x) = \frac{1}{\sqrt{1 - x^2}}\]
\[\text{II} = 1 \implies \int 1\,dx = x\]

Applying integration by parts:

\[I = x \sin^{-1} x - \int \frac{x}{\sqrt{1 - x^2}}\,dx\]

For the remaining integral, notice that the derivative of \(1 - x^2\) is \(-2x\).

Rewrite the numerator:

\[-\int \frac{x}{\sqrt{1 - x^2}}\,dx = \frac{1}{2}\int (1 - x^2)^{-1/2}(-2x\,dx) = \frac{1}{2} \cdot \frac{(1 - x^2)^{1/2}}{1/2} = \sqrt{1 - x^2}\]

Therefore:

\[I = x \sin^{-1} x + \sqrt{1 - x^2} + C\]

Example 5

Evaluate:

\[I = \int \tan^{-1} x\,dx\]

Solution:

Write the integral as \(\int (\tan^{-1} x \cdot 1)\,dx\):

\[\text{I} = \tan^{-1} x \implies \frac{d}{dx}(\tan^{-1} x) = \frac{1}{1 + x^2}\]
\[\text{II} = 1 \implies \int 1\,dx = x\]

Applying integration by parts:

\[I = x \tan^{-1} x - \int \frac{x}{1 + x^2}\,dx\]

Multiply and divide by \(2\) to complete the derivative of the denominator:

\[\int \frac{x}{1 + x^2}\,dx = \frac{1}{2}\int \frac{2x}{1 + x^2}\,dx = \frac{1}{2}\ln(1 + x^2)\]

Therefore:

\[I = x \tan^{-1} x - \frac{1}{2}\ln(1 + x^2) + C\]

Example 6

Evaluate:

\[I = \int \ln\left(x + \sqrt{1 + x^2}\right) dx\]

Solution:

Write the integrand as \(\ln\left(x + \sqrt{1 + x^2}\right) \cdot 1\):

\[\text{I} = \ln\left(x + \sqrt{1 + x^2}\right)\]
\[\text{II} = 1 \implies \int 1\,dx = x\]

Compute the derivative of Function I using the chain rule:

\[\frac{d}{dx}\left[\ln\left(x + \sqrt{1 + x^2}\right)\right] = \frac{1}{x + \sqrt{1 + x^2}} \cdot \left(1 + \frac{2x}{2\sqrt{1 + x^2}}\right)\]
\[\frac{d}{dx}\left[\ln\left(x + \sqrt{1 + x^2}\right)\right] = \frac{1}{x + \sqrt{1 + x^2}} \cdot \left(\frac{\sqrt{1 + x^2} + x}{\sqrt{1 + x^2}}\right) = \frac{1}{\sqrt{1 + x^2}}\]

Applying integration by parts:

\[I = x \ln\left(x + \sqrt{1 + x^2}\right) - \int \frac{x}{\sqrt{1 + x^2}}\,dx\]

Since \(\frac{d}{dx}\left[\sqrt{1 + x^2}\right] = \frac{x}{\sqrt{1 + x^2}}\), the remaining integral evaluates directly:

\[\int \frac{x}{\sqrt{1 + x^2}}\,dx = \sqrt{1 + x^2}\]

Therefore:

\[I = x \ln\left(x + \sqrt{1 + x^2}\right) - \sqrt{1 + x^2} + C\]

Cyclic Integrals

In certain problems, applying integration by parts repeatedly does not terminate in an elementary polynomial integral. Instead, the original integral \(I\) reappears on the right-hand side with a sign or coefficient that allows it to be solved algebraically.


Example 7

Evaluate:

\[I = \int e^x \sin x\,dx\]

Solution:

According to ILATE, let:

\[\text{I} = \sin x \implies \frac{d}{dx}(\sin x) = \cos x\]
\[\text{II} = e^x \implies \int e^x\,dx = e^x\]

First Application:

\[I = \sin x \int e^x\,dx - \int \left( \frac{d}{dx}(\sin x) \cdot \int e^x\,dx \right) dx\]
\[I = e^x \sin x - \int e^x \cos x\,dx\]

Second Application:

For the integral \(\int e^x \cos x\,dx\), again choose:

\[\text{I} = \cos x \implies \frac{d}{dx}(\cos x) = -\sin x\]
\[\text{II} = e^x \implies \int e^x\,dx = e^x\]

Evaluating:

\[\int e^x \cos x\,dx = \cos x(e^x) - \int (-\sin x)(e^x)\,dx = e^x \cos x + \int e^x \sin x\,dx\]

Notice that the remaining integral is our original integral \(I\):

\[\int e^x \cos x\,dx = e^x \cos x + I\]

Substitute this back into the equation for \(I\):

\[I = e^x \sin x - (e^x \cos x + I)\]
\[I = e^x \sin x - e^x \cos x - I\]

Add \(I\) to both sides:

\[2I = e^x(\sin x - \cos x)\]
\[I = \frac{e^x}{2}(\sin x - \cos x) + C\]

Example 8

Evaluate:

\[I = \int \sec^3 x\,dx\]

Solution:

Rewrite the integrand as:

\[I = \int \sec x \cdot \sec^2 x\,dx\]

Both factors are trigonometric, so ILATE does not decide between them. However, \(\sec^2 x\) has the immediate integral \(\tan x\), whereas integrating \(\sec x\) produces a logarithm.

Therefore:

\[\text{I} = \sec x \implies \frac{d}{dx}(\sec x) = \sec x \tan x\]
\[\text{II} = \sec^2 x \implies \int \sec^2 x\,dx = \tan x\]

Applying integration by parts:

\[I = \sec x \tan x - \int (\sec x \tan x)(\tan x)\,dx\]
\[I = \sec x \tan x - \int \sec x \tan^2 x\,dx\]

Use the Pythagorean identity \(\tan^2 x = \sec^2 x - 1\):

\[\int \sec x \tan^2 x\,dx = \int \sec x(\sec^2 x - 1)\,dx = \int \sec^3 x\,dx - \int \sec x\,dx\]

Recognizing the first term as \(I\):

\[\int \sec x \tan^2 x\,dx = I - \ln|\sec x + \tan x|\]

Substitute this back into our expression for \(I\):

\[I = \sec x \tan x - (I - \ln|\sec x + \tan x|)\]
\[I = \sec x \tan x - I + \ln|\sec x + \tan x|\]

Add \(I\) to both sides:

\[2I = \sec x \tan x + \ln|\sec x + \tan x|\]
\[I = \frac{1}{2}\sec x \tan x + \frac{1}{2}\ln|\sec x + \tan x| + C\]

Further Techniques and Transformations


Example 9

Evaluate:

\[I = \int x \tan^{-1} x\,dx\]

Solution:

Following ILATE, set:

\[\text{I} = \tan^{-1} x \implies \frac{d}{dx}(\tan^{-1} x) = \frac{1}{1 + x^2}\]
\[\text{II} = x \implies \int x\,dx = \frac{x^2}{2}\]

Applying the formula:

\[I = \frac{x^2}{2}\tan^{-1} x - \int \left( \frac{1}{1 + x^2} \cdot \frac{x^2}{2} \right) dx\]
\[I = \frac{x^2}{2}\tan^{-1} x - \frac{1}{2}\int \frac{x^2}{1 + x^2}\,dx\]

Rewrite the fraction by adding and subtracting \(1\):

\[\frac{x^2}{1 + x^2} = \frac{(x^2 + 1) - 1}{1 + x^2} = 1 - \frac{1}{1 + x^2}\]

Integrating this expression:

\[\int \left(1 - \frac{1}{1 + x^2}\right) dx = x - \tan^{-1} x\]

Substitute back:

\[I = \frac{x^2}{2}\tan^{-1} x - \frac{1}{2}(x - \tan^{-1} x) + C\]

Grouping the \(\tan^{-1} x\) terms:

\[I = \frac{x^2 + 1}{2}\tan^{-1} x - \frac{x}{2} + C\]

Example 10

Evaluate:

\[I = \int \frac{x \sin^{-1} x}{\sqrt{1 - x^2}}\,dx\]

Solution:

Notice that the factor \(\frac{x}{\sqrt{1 - x^2}}\) is easily integrable:

\[\int \frac{x}{\sqrt{1 - x^2}}\,dx = -\frac{1}{2}\int (1 - x^2)^{-1/2}(-2x\,dx) = -\sqrt{1 - x^2}\]

Choose:

\[\text{I} = \sin^{-1} x \implies \frac{d}{dx}(\sin^{-1} x) = \frac{1}{\sqrt{1 - x^2}}\]
\[\text{II} = \frac{x}{\sqrt{1 - x^2}} \implies \int \text{II}\,dx = -\sqrt{1 - x^2}\]

Applying integration by parts:

\[I = (\sin^{-1} x)(-\sqrt{1 - x^2}) - \int \left( \frac{1}{\sqrt{1 - x^2}} \cdot (-\sqrt{1 - x^2}) \right) dx\]

The radicals cancel cleanly:

\[I = -\sqrt{1 - x^2}\sin^{-1} x - \int (-1)\,dx\]
\[I = -\sqrt{1 - x^2}\sin^{-1} x + x + C\]

Example 11

Evaluate:

\[I = \int \frac{x e^x}{(x + 1)^2}\,dx\]

Solution:

Rewrite the algebraic part by adjusting the numerator:

\[\frac{x}{(x + 1)^2} = \frac{(x + 1) - 1}{(x + 1)^2} = \frac{1}{x + 1} - \frac{1}{(x + 1)^2}\]

The integral becomes:

\[I = \int e^x \left[ \frac{1}{x + 1} - \frac{1}{(x + 1)^2} \right] dx = \int \frac{e^x}{x + 1}\,dx - \int \frac{e^x}{(x + 1)^2}\,dx\]

Apply integration by parts to the first integral \(\int \frac{e^x}{x + 1}\,dx\):

Choose:

\[\text{I} = \frac{1}{x + 1} \implies \frac{d}{dx}\left(\frac{1}{x + 1}\right) = -\frac{1}{(x + 1)^2}\]
\[\text{II} = e^x \implies \int e^x\,dx = e^x\]

Integrating by parts:

\[\int \frac{e^x}{x + 1}\,dx = \frac{e^x}{x + 1} - \int \left( -\frac{1}{(x + 1)^2} \cdot e^x \right) dx = \frac{e^x}{x + 1} + \int \frac{e^x}{(x + 1)^2}\,dx\]

Substitute this result back into \(I\):

\[I = \left( \frac{e^x}{x + 1} + \int \frac{e^x}{(x + 1)^2}\,dx \right) - \int \frac{e^x}{(x + 1)^2}\,dx\]

The remaining integrals cancel out completely:

\[I = \frac{e^x}{x + 1} + C\]

(Note: This illustrates the general theorem \(\int e^x [f(x) + f'(x)]\,dx = e^x f(x) + C\), which is a direct consequence of integration by parts.)


Example 12

Evaluate:

\[I = \int \sqrt{a^2 - x^2}\,dx \qquad (a > 0)\]

Solution:

We can establish this fundamental formula using integration by parts by introducing the dummy factor \(1\):

\[I = \int \sqrt{a^2 - x^2} \cdot 1\,dx\]

Let:

\[\text{I} = \sqrt{a^2 - x^2} \implies \frac{d}{dx}\left(\sqrt{a^2 - x^2}\right) = \frac{-x}{\sqrt{a^2 - x^2}}\]
\[\text{II} = 1 \implies \int 1\,dx = x\]

Applying integration by parts:

\[I = x\sqrt{a^2 - x^2} - \int \frac{-x^2}{\sqrt{a^2 - x^2}}\,dx = x\sqrt{a^2 - x^2} + \int \frac{x^2}{\sqrt{a^2 - x^2}}\,dx\]

Rewrite \(x^2\) in the numerator as \(a^2 - (a^2 - x^2)\):

\[\frac{x^2}{\sqrt{a^2 - x^2}} = \frac{a^2 - (a^2 - x^2)}{\sqrt{a^2 - x^2}} = \frac{a^2}{\sqrt{a^2 - x^2}} - \sqrt{a^2 - x^2}\]

Substitute this decomposition into the integral:

\[I = x\sqrt{a^2 - x^2} + \int \frac{a^2}{\sqrt{a^2 - x^2}}\,dx - \int \sqrt{a^2 - x^2}\,dx\]

Notice that the last integral is \(I\):

\[I = x\sqrt{a^2 - x^2} + a^2\int \frac{dx}{\sqrt{a^2 - x^2}} - I\]

Using the standard formula \(\int \frac{dx}{\sqrt{a^2 - x^2}} = \sin^{-1}\left(\frac{x}{a}\right)\):

\[I = x\sqrt{a^2 - x^2} + a^2\sin^{-1}\left(\frac{x}{a}\right) - I\]

Add \(I\) to both sides:

\[2I = x\sqrt{a^2 - x^2} + a^2\sin^{-1}\left(\frac{x}{a}\right)\]

Dividing by \(2\):

\[I = \frac{x}{2}\sqrt{a^2 - x^2} + \frac{a^2}{2}\sin^{-1}\left(\frac{x}{a}\right) + C\]