Integration by parts turns the integral of a product into another integral, which is often easier. It is the product rule for derivatives, read backwards.
The formula
Let and be differentiable functions of . The product rule says
Integrate both sides. With and , this reads
and moving one integral to the other side gives the formula:
To use it, split the integrand into two factors. One is , which you differentiate to get . The other, with , is , which you integrate to get . The formula then trades the integral you have for .
A picture of the formula
For a definite integral, the same identity is a statement about areas.

As and both grow along a curve from to , the region under the curve is and the region to its left is . Together they fill the large rectangle less the small one, so .
Choosing u and dv
The formula is always true, but it helps only when is easier than the integral you began with. Two conditions guide the choice:
- must be something you can integrate.
- should become simpler when you differentiate it.
A polynomial loses a degree with each derivative, while , and keep their form when you integrate them. So for or , let be the polynomial.
A common rule of thumb, LIATE, orders the candidates for : logarithms, inverse trigonometric functions, algebraic functions such as polynomials, trigonometric functions, exponentials. Take from the class that comes first. It is a guide, not a law: when the new integral looks harder than the old one, swap the roles.
A first example
Take . Let and . Then and , and
Check the answer by differentiating it:
One constant is enough
We wrote without a constant of integration. A constant added to would change nothing but the constant of the answer, since and . So one at the end is enough.
A second example
Take . Let and . Then and :
Check:
The other choice
With the roles swapped, and , we get and :
The equation is true, but the new integral has where the old one had . It is harder, not easier, and that is the sign to swap the roles back.
A factor you cannot see
The integrand is a product too: times . For , take and . Then and :
The derivative of is , as it should be.
When the integral comes back
Let . With and :
Integrate by parts again, with and , so that :
The integral you started with has come back. Substitute: , so and
Check: the derivative of is , and half of that is the integrand.
With limits
For a definite integral, the formula keeps its bounds:
The bracket is in the picture above, with the values at and the values at . With the first example:
Asking Hilberon
In the solver, the second example is written as a query: the integrand, then the variable.
integrate(x*cos(x), x)
The Open in the solver button writes the query into the editor. Nothing runs until you evaluate it.
The answer comes with the methods that produced it and, when the engine certified it, how it was checked. The Steps button under the answer shows the derivation: numbered lines, each with a caption that names the method and its key choices, such as Integration by parts · , .
For the first step says: “Integrate by parts with and . Then and , so .” The Why? button beside the caption holds that sentence, the reason for the method (“The integrand is a product, and integrating by parts trades it for an integral of ”), the rule's formula and the piece of the problem the step worked on.
A derivation is shown only when it passes a check. For an integral, the check is the one we did by hand above: the derivative of the result must equal the integrand. The derivation ends with that sentence, “Checked: the derivative of the result equals the integrand.” When no derivation passes, the answer is shown as computed by the engine, with no textbook derivation. Hilberon does not show a wrong step.
Signed in, you can also ask for other methods of the same problem. Each comes back as a verified derivation of its own, when another method applies.
The definite integral and the integral that comes back are queries too:
integrate(x*exp(x), x = 0..1)integrate(exp(x)*sin(x), x)The examples page has more integrals to try, by topic.