Integrals

Integration by Parts Explained With Examples

Learn the integration by parts formula, how to choose u and dv, and how to avoid common setup mistakes.

Integration by parts is based on the product rule for derivatives. It is useful when an integral contains a product of two expressions and substitution does not simplify the problem. The formula is \(\int u\,dv = uv - \int v\,du\).

When to use integration by parts

Try this method for products such as \(xe^x\), \(x\sin x\), \(x\ln x\), or polynomial times trigonometric or exponential functions. The method works best when differentiating one factor makes it simpler.

Choosing u and dv

A common guideline is LIATE: logarithmic, inverse trig, algebraic, trigonometric, exponential. This is not a law, but it often helps choose \(u\). The remaining factor becomes \(dv\) and must be easy to integrate.

Worked example

Problem: integrate \(xe^x\,dx\). Let \(u = x\), so \(du = dx\). Let \(dv = e^x\,dx\), so \(v = e^x\). Apply the formula: \(\int xe^x\,dx = xe^x - \int e^x\,dx = xe^x - e^x + C\).

Another example

For \(\int x\cos(x)\,dx\), choose \(u = x\) and \(dv = \cos(x)\,dx\). Then \(du = dx\) and \(v = \sin(x)\). The result is \(x\sin(x) - \int \sin(x)\,dx = x\sin(x) + \cos(x) + C\).

Common mistakes

The formula has a minus sign, and losing it changes the answer. Students also sometimes pick \(dv\) as something they cannot integrate. A good setup should make the remaining integral simpler than the original.

How to decide if parts is worth using

Integration by parts should make the problem simpler after one round. If the remaining integral is more complicated than the original, revisit the choice of \(u\) and \(dv\). A strong choice usually makes \(du\) simpler than \(u\), while \(dv\) stays easy to integrate. This is why logarithms and inverse trigonometric functions often become \(u\): differentiating them usually removes the difficult part.

It helps to compare methods. Some products are better handled by substitution, especially when one factor is the derivative of an inside expression. If you are unsure, read U-Substitution Explained With Examples and ask which method makes the next line shorter. For broad integral strategy, keep How to Solve Indefinite Integrals Step by Step nearby as a method-selection map.

For repeated integration by parts, such as polynomial times sine or exponential functions, organize the work in a table or aligned lines. The main risk is not the formula itself; it is losing signs or forgetting which expression was already differentiated. After solving, compare the derivative of your answer with the original integrand before simplifying too aggressively.

Calculator check

Use the Integral Calculator to compare the result, but also differentiate your answer. Integration by parts answers can look different but still be equivalent after simplification.

Study checklist

Before using integration by parts, check that \(dv\) can actually be integrated. Then check that \(du\) is simpler than \(u\). If both checks pass, the setup is probably reasonable. If the remaining integral becomes larger or messier, try a different choice or another method.

Keep signs visible. Many errors happen when students write the formula from memory and lose the minus sign before the second integral. Writing the formula above the work helps. For repeated parts, table methods can reduce clutter, but the same logic still applies: differentiate one side, integrate the other, and track alternating signs carefully.

Practice prompts

Make a table with three columns: integrand, choice of \(u\), and choice of \(dv\). Fill it with examples such as \(x e^x\), \(x\sin x\), \(x\ln x\), and \(x^2 e^x\). Before solving, predict whether one round of integration by parts will finish the problem or whether repeated parts will be needed.

This prediction step is valuable. It teaches you to see integration by parts as a strategy rather than a formula dump. If you can explain why differentiating \(x^2\) repeatedly makes the polynomial simpler, you are less likely to get lost in longer examples.

Teacher-style review questions

After choosing \(u\) and \(dv\), ask what happens to the next integral. Is it shorter, simpler, or part of a repeating pattern? If not, integration by parts may still be valid, but it may not be efficient. In exams, method efficiency matters because a valid but messy path can waste time and increase sign errors.