← MATH 162 MathScape 0 MATH162

Integration by Parts Formula

13 min read

Jump to a section
Reference: Stewart §7.1

Textbook Reference

Primary source OpenStax Calculus Volume 2, Section 3.1: “Integration by Parts”
Direct link https://openstax.org/books/calculus-volume-2/pages/3-1-integration-by-parts
Supplementary Calculus (Stewart), Section 7.1: “Integration by Parts,” page 524

OpenStax Calculus Volume 2 is free and openly licensed. The Stewart derivation and first worked example appear on pages 524 to 525 of that text.


Key idea

Integration by parts is the product rule, read backward.

You already know the product rule for derivatives: the derivative of a product $f(x)g(x)$ is $f'(x)g(x) + f(x)g'(x)$. Every differentiation rule has a matching integration rule, because integration undoes differentiation. The chain rule, run backward, becomes substitution. The product rule, run backward, becomes integration by parts.

Here is the picture. Suppose you are handed an integral that is a product of two pieces, like $\int x \sin x\, dx$. Neither the power rule nor substitution touches it cleanly. But the product rule says that whenever you differentiate a product, you get two terms added together. So if you could integrate the whole product-rule equation, you would get the product back on one side and a sum of two integrals on the other. Rearranging that equation lets you trade the integral you cannot do for a different integral you can do. That trade is the entire method.

This means: you are not memorizing a magic formula. You are using the product rule in reverse, organized so that a hard integral becomes an easier one. When the trade makes the integral simpler, you win. When it makes the integral worse, you chose the pieces backward and you try the other assignment.


Prerequisite Check

Before this lesson, make sure you can do all of the following:

If the product rule or the basic antiderivatives are shaky, review the Product Rule and Substitution lessons first. The choice of which piece to call $u$ leans directly on how comfortable you are differentiating.


Quick Reference

The formula (indefinite integrals). \[ \int u\, dv = uv - \int v\, du \]

To use it, you split the integrand into two parts. You name one part $u$ and the rest (including $dx$) $dv$. Then you differentiate $u$ to get $du$ and antidifferentiate $dv$ to get $v$. You assemble $uv - \int v\, du$ and hope the new integral $\int v\, du$ is easier than the one you started with.

Choosing $u$: the LIATE guideline. When the integrand is a product, choose $u$ to be whichever factor comes first in this list:

Order Function type Example
L Logarithmic $\ln x$
I Inverse trigonometric $\arctan x$
A Algebraic (powers of $x$) $x$, $x^2$
T Trigonometric $\sin x$, $\cos x$
E Exponential $e^x$

The part you pick as $u$ should get simpler when you differentiate it; the part you leave as $dv$ should be something you can integrate. LIATE is a guideline, not a law (it usually points to a good choice, but a strange integrand can break it).

The differential shorthand.

Symbol Meaning How you get it
$u$ the part you differentiate you choose it (LIATE)
$dv$ the rest, including $dx$ whatever is left over
$du$ $u'\, dx$ differentiate $u$
$v$ $\int dv$ antidifferentiate $dv$ (drop $+C$ here)

Key Concepts

1. Deriving the Formula from the Product Rule

This derivation is worth reading once in full, so the formula never feels arbitrary.

Goal. Turn the product rule into a statement about integrals.

Step 1. Start from the product rule for two differentiable functions $f$ and $g$: \[ \frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x). \]

Step 2. Integrate both sides with respect to $x$. The left side integrates back to the product, because integration undoes the derivative: \[ f(x)g(x) = \int f'(x)g(x)\, dx + \int f(x)g'(x)\, dx. \]

Step 3. Solve for the second integral on the right (subtract the first integral from both sides): \[ \int f(x)g'(x)\, dx = f(x)g(x) - \int f'(x)g(x)\, dx. \]

Step 4. Rename to the compact form. Let $u = f(x)$ and $v = g(x)$. Then $du = f'(x)\, dx$ and $dv = g'(x)\, dx$, and the equation becomes: \[ \boxed{\int u\, dv = uv - \int v\, du} \]

Recap. The formula is just the product rule integrated and rearranged. The product $uv$ comes from the left side; the two integrals are the two terms of the product rule. Reading it as a trade: $\int u\, dv$ is the integral you have, and $\int v\, du$ is the integral you swap it for.


2. The Procedure (A Flashcard-Sized Recipe)

To evaluate $\int (\text{product})\, dx$ by parts:

  1. Choose $u$ and $dv$. Use LIATE to pick $u$. Everything else, including $dx$, is $dv$.
  2. Differentiate and integrate. Compute $du = u'\, dx$ and $v = \int dv$ (no $+C$ at this step).
  3. Assemble. Write $uv - \int v\, du$.
  4. Evaluate the new integral $\int v\, du$. If it is simpler, finish it. If it is worse, go back to step 1 and swap your choice of $u$ and $dv$.
  5. Add $+C$ at the end, once.

A good choice makes $\int v\, du$ easier than the original. (A common first mistake is to call the polynomial $dv$ and the trig or exponential factor $u$, which makes the new integral worse, not better. LIATE is designed to steer you away from that.)

Quick self-check. In $\displaystyle\int x e^x\, dx$, which factor should be $u$, and why?

Show answer

Let $u = x$. By LIATE, Algebraic (A) comes before Exponential (E). The reason behind the rule: differentiating $x$ gives $1$, which simplifies the integral, while $e^x$ integrates to $e^x$ without getting worse. Choosing $u = e^x$ instead would raise the power of $x$ and move you backward.


3. Worked Example: The Canonical First Integral

Example 1. Find $\displaystyle\int x \sin x\, dx$.

Goal and thought process. The integrand is a product of an algebraic factor $x$ and a trigonometric factor $\sin x$. Substitution does not apply, because the derivative of $x$ (namely 1) is not paired with anything, and $\sin x$ is not the derivative of an inside function here. This is a parts problem. By LIATE, Algebraic (A) comes before Trigonometric (T), so let $u = x$.

Step 1. Choose. Let $u = x$ and $dv = \sin x\, dx$.

Step 2. Differentiate and integrate. \[ du = dx, \qquad v = \int \sin x\, dx = -\cos x. \]

Step 3. Assemble using $\int u\, dv = uv - \int v\, du$: \[ \int x \sin x\, dx = x(-\cos x) - \int (-\cos x)\, dx = -x\cos x + \int \cos x\, dx. \]

Step 4. Evaluate the new integral. The integral $\int \cos x\, dx = \sin x$ is one you know: \[ \int x \sin x\, dx = -x\cos x + \sin x + C. \]

Boxed answer. \[ \boxed{\int x \sin x\, dx = -x\cos x + \sin x + C} \]

Check by differentiating. Use the product rule on $-x\cos x$: its derivative is $-\cos x - x(-\sin x) = -\cos x + x\sin x$. Add the derivative of $\sin x$, which is $\cos x$. The two $\cos x$ terms cancel, leaving $x \sin x$. That is the original integrand, so the answer is correct.

Why checking matters. Integration is harder to verify by eye than differentiation, so differentiate your answer whenever you have time. If you do not get the original integrand back, you made a sign error or an arithmetic slip somewhere.


4. Worked Example: When One Factor Is Hidden

Example 2. Find $\displaystyle\int \ln x\, dx$.

Goal and thought process. There is only one function here, not an obvious product, so it is tempting to think parts does not apply. The trick: treat the integrand as $\ln x$ times $1$. By LIATE, Logarithmic (L) is first, so let $u = \ln x$ and $dv = 1\, dx$. The reason this works is that $\ln x$ has no antiderivative you can write down directly, but its derivative $\frac{1}{x}$ is simple, so making it $u$ turns a hard problem into an easy one.

Step 1. Choose. Let $u = \ln x$ and $dv = dx$.

Step 2. Differentiate and integrate. \[ du = \frac{1}{x}\, dx, \qquad v = \int dx = x. \]

Step 3. Assemble. \[ \int \ln x\, dx = (\ln x)(x) - \int x \cdot \frac{1}{x}\, dx = x\ln x - \int 1\, dx. \]

Step 4. Evaluate. The new integral is just $\int 1\, dx = x$: \[ \boxed{\int \ln x\, dx = x\ln x - x + C} \]

Check. Differentiate $x\ln x - x$: the product rule gives $\ln x + x \cdot \frac{1}{x} = \ln x + 1$, and the derivative of $-x$ is $-1$. The $+1$ and $-1$ cancel, leaving $\ln x$. Correct.

Recap. Two ideas carry over to many problems: pad a lone function with a factor of $1$ so $dv = dx$, and choose the logarithm or inverse trig function as $u$ because its derivative is the simple part.


5. How to Recognize a Parts Problem

Reach for integration by parts when the integrand is a product of two functions of different types and substitution does not apply. The clearest signals:

If instead you see a function paired with its own derivative (such as $\int 2x\cos(x^2)\, dx$, where $2x$ is the derivative of $x^2$), that is a substitution problem, not a parts problem. Sorting these two apart is half the skill.


Common Errors Summary

Error What it looks like Correction
Choosing $u$ and $dv$ backward Picking $u = \sin x$, $dv = x\, dx$ in $\int x\sin x\, dx$, which makes the new integral worse Use LIATE: the part that simplifies when differentiated is $u$
Dropping the minus sign in the formula Writing $\int u\, dv = uv + \int v\, du$ The formula subtracts: $uv - \int v\, du$
Forgetting the sign when integrating sine Writing $v = \cos x$ from $dv = \sin x\, dx$ $\int \sin x\, dx = -\cos x$
Adding $+C$ to $v$ in the middle Carrying a $+C$ through $v$ before the end Use any single antiderivative for $v$; add $+C$ once, at the very end
Trying parts on a substitution problem Splitting $\int 2x\cos(x^2)\, dx$ into $u$ and $dv$ Spot the inside function and its derivative; use substitution instead

Common Misconceptions

Common misconception

the integral of a product equals the product of the integrals.

This is the multiplicative-not-additive error. The rule $\int f(x)g(x)\,dx = \bigl(\int f(x)\,dx\bigr)\bigl(\int g(x)\,dx\bigr)$ is false. For example, $\int x e^x\,dx = e^x(x-1)+C$, whereas $\bigl(\int x\,dx\bigr)\bigl(\int e^x\,dx\bigr) = \tfrac{x^2}{2}e^x + C$, a different expression. Integration by parts exists precisely because products do not split this way; the formula $\int u\,dv = uv - \int v\,du$ is the correct tool.

Common misconception

integration by parts undoes the chain rule.

This is the composition-is-not-chaining error. Integration by parts reverses the product rule, not the chain rule. The antidifferentiation rule that reverses the chain rule is substitution ($u$-substitution). An integral like $\int x e^{x^2}\,dx$ looks like a product but is actually a composition ($e^{x^2}$ with inside function $x^2$); its derivative $2xe^{x^2}$ is present in the integrand, so substitution finishes it in one step. Applying parts instead misidentifies the structure and produces unnecessary complexity.


Leveled Practice

Level 1 -- Direct Application

Problem 1. Evaluate $\displaystyle\int x e^x\, dx$.

Show answer

By LIATE, Algebraic before Exponential, so $u = x$, $dv = e^x\, dx$. Then $du = dx$ and $v = e^x$.

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

Check: differentiate $e^x(x-1)$ with the product rule: $e^x(x-1) + e^x(1) = e^x \cdot x$. Correct. $\checkmark$


Problem 2. Evaluate $\displaystyle\int x \cos x\, dx$.

Show answer

$u = x$, $dv = \cos x\, dx$, so $du = dx$ and $v = \sin x$.

\[ \int x \cos x\, dx = x\sin x - \int \sin x\, dx = x\sin x + \cos x + C. \]

Check: derivative of $x\sin x + \cos x$ is $\sin x + x\cos x - \sin x = x\cos x$. Correct. $\checkmark$


Problem 3. Identify, without solving, whether $\displaystyle\int x^2 e^{x^3}\, dx$ should be done by parts or by substitution.

Show answer

By substitution. The inside function is $x^3$, and its derivative is $3x^2$, which (up to the constant 3) is the $x^2$ sitting in front. Let $w = x^3$, $dw = 3x^2\, dx$. There is no need for parts. Parts is for products of different types where no inside-and-its-derivative pairing exists.


Level 2 -- Choosing the Parts

Problem 4. Evaluate $\displaystyle\int \arctan x\, dx$.

Show answer

Only one function, so pad with $1$: $u = \arctan x$, $dv = dx$ (Inverse trig is high on LIATE). Then $du = \dfrac{1}{1+x^2}\, dx$ and $v = x$.

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

The remaining integral yields to substitution $w = 1 + x^2$, $dw = 2x\, dx$: \[ \int \frac{x}{1+x^2}\, dx = \frac{1}{2}\ln(1+x^2). \]

So \[ \int \arctan x\, dx = x\arctan x - \frac{1}{2}\ln(1+x^2) + C. \]

This shows a common pattern: one round of parts, then a substitution to finish. $\checkmark$


Problem 5. Evaluate $\displaystyle\int x \ln x\, dx$.

Show answer

By LIATE, Logarithmic comes before Algebraic, so $u = \ln x$, $dv = x\, dx$. Then $du = \dfrac{1}{x}\, dx$ and $v = \dfrac{x^2}{2}$.

\[ \int x \ln x\, dx = \frac{x^2}{2}\ln x - \int \frac{x^2}{2}\cdot\frac{1}{x}\, dx = \frac{x^2}{2}\ln x - \int \frac{x}{2}\, dx. \]

\[ = \frac{x^2}{2}\ln x - \frac{x^2}{4} + C. \]

Check: differentiate. The first term gives $x\ln x + \frac{x^2}{2}\cdot\frac{1}{x} = x\ln x + \frac{x}{2}$; the second gives $-\frac{x}{2}$. They combine to $x\ln x$. Correct. $\checkmark$

(Notice what would have gone wrong with the opposite choice: $u = x$, $dv = \ln x\, dx$ requires knowing $\int \ln x\, dx$ before you can even write $v$. LIATE saved you from that.)


Level 3 -- Reasoning About the Method

Problem 6. Explain why integration by parts and the substitution rule are described as the integration partners of the product rule and the chain rule.

Show answer

Differentiation and integration are inverse operations, so every differentiation rule has a matching rule for integrals. The chain rule describes the derivative of a composition $f(g(x))$; reversing it produces the substitution rule, which integrates expressions containing an inside function and its derivative. The product rule describes the derivative of a product $f(x)g(x)$; integrating the product-rule equation and rearranging produces $\int u\, dv = uv - \int v\, du$, which is integration by parts. In short: substitution undoes the chain rule, and parts undoes the product rule.


Problem 7. A student writes $\displaystyle\int x\sin x\, dx = uv - \int v\, du$ with $u = \sin x$ and $dv = x\, dx$. Carry out their choice one step and explain why it is a poor one.

Show answer

With $u = \sin x$, $dv = x\, dx$: then $du = \cos x\, dx$ and $v = \dfrac{x^2}{2}$. The formula gives \[ \int x\sin x\, dx = \frac{x^2}{2}\sin x - \int \frac{x^2}{2}\cos x\, dx. \] The new integral $\int \frac{x^2}{2}\cos x\, dx$ has a higher power of $x$ than the original. The method moved backward: the algebraic factor grew instead of shrinking. The fix is the LIATE choice $u = x$, $dv = \sin x\, dx$, which shrinks the power of $x$ to a constant and finishes in one step. $\checkmark$


Mastery Checklist

You have mastered this skill when you can do all of the following without referring to notes:


Mental Model

Think of integration by parts as a trade.

You start holding an integral you cannot evaluate, $\int u\, dv$. The formula lets you hand it back and receive two things in return: a finished product $uv$ that needs no integration at all, and a different integral $\int v\, du$. The whole game is to set up the trade so the integral you receive is easier than the one you gave away.

LIATE is your trading strategy. You want $u$ to be the factor that gets simpler each time you differentiate it (a power of $x$ collapses toward a constant; a logarithm turns into $\frac{1}{x}$). You want $dv$ to be the factor that integrates without growing more complicated (an exponential stays an exponential; sine and cosine just cycle). When you pick the factors that way, the trade moves you toward an integral you can finish. When you pick them backward, the trade hands you something worse, which is the signal to swap and trade again.

This is the same spirit as substitution. Both techniques transform a hard integral into an easier one. Substitution does it by renaming an inside function; parts does it by splitting a product and trading.


Connections

Within Techniques of Integration (MATH162)

Toward Later Mathematics

Audience Notes

For students who find math intimidating: You only need to memorize one line: $\int u\, dv = uv - \int v\, du$, and the word LIATE for choosing $u$. Everything else is following the recipe and checking your answer by differentiating. If a choice makes the integral uglier, you picked the parts backward; swap them and try again. Making that mistake is normal and costs you nothing but a second attempt.

For students interested in proof: The derivation is a one-line consequence of the product rule, but notice the hypothesis hiding in it: $f$ and $g$ must be differentiable for the product rule to hold. The formula extends to definite integrals only when the functions are well behaved on the whole interval, the same continuity caution that governs the Fundamental Theorem of Calculus.

For students interested in careers: Integration by parts is one of the workhorses of applied mathematics, physics, and engineering. It is how you move a derivative off of one factor and onto another inside an integral, which is the central step in deriving weak forms for the finite element method, in signal processing, and in quantum mechanics.


Back to Techniques of Integration | Next: Integration by Parts with Definite Integrals