Integration by Parts

Integration by Parts is a calculus technique for evaluating integrals of products by transforming them into simpler forms when substitution fails.

udv=uvvdu\int u\,dv = uv - \int v\,du

Solve a problem with Integration by Parts

Type the problem. The solver will use Integration by Parts where Integration by Parts is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Integration by Parts takes
uu
vv
Integration by Parts
SymbolMeaning
uuOne factor of the product in the integrand, chosen so that its derivative dudu is simpler; if this choice makes the resulting integral vdu\int v\,du harder than the original, you chose incorrectly.
vvThe antiderivative of the other factor; computed by integrating dvdv and then multiplied by uu in the formula, so it must be found accurately.

When to use it

Use Integration by Parts when you have an integral of a product and u-substitution does not apply.

Level

Usually taught in: Calculus II · Appears on: AP Calculus

Worked examples

1. Integrate polynomial times sine

Problem

Find xsin(x)dx\int x \sin(x)\,dx.
  1. u=x,dv=sin(x)dxu = x, \quad dv = \sin(x)\,dx

    Choose the polynomial as uu because its derivative will be simpler than the original factor.

  2. du=dx,v=cos(x)du = dx, \quad v = -\cos(x)

    Differentiate uu to get dxdx, and integrate dvdv using sin(x)dx=cos(x)\int \sin(x)\,dx = -\cos(x).

  3. xsin(x)dx=x(cos(x))(cos(x))dx\int x \sin(x)\,dx = x \cdot (-\cos(x)) - \int (-\cos(x))\,dx

    Substitute into the Integration by Parts formula udv=uvvdu\int u\,dv = uv - \int v\,du.

  4. =xcos(x)+cos(x)dx= -x\cos(x) + \int \cos(x)\,dx

    Simplify by distributing the negative sign.

  5. =xcos(x)+sin(x)+C= -x\cos(x) + \sin(x) + C

    Integrate cos(x)\cos(x) to get sin(x)\sin(x) and add the constant of integration.

Answer: xcos(x)+sin(x)+C-x\cos(x) + \sin(x) + C

This problem pairs a polynomial with a trigonometric function, making it a prime candidate for Integration by Parts. We choose u=xu = x to reduce the degree under differentiation, leaving us with a simple integral of cosine to evaluate at the end.

2. Integrate polynomial times exponential with a negative exponent

Problem

Find xe2xdx\int x e^{-2x}\,dx.
  1. u=x,dv=e2xdxu = x, \quad dv = e^{-2x}\,dx

    Choose the polynomial part as uu so that differentiation simplifies it to a constant.

  2. du=dx,v=12e2xdu = dx, \quad v = -\frac{1}{2}e^{-2x}

    Differentiate uu to get dxdx, and integrate dvdv using the formula eaxdx=1aeax\int e^{ax}\,dx = \frac{1}{a}e^{ax} with a=2a = -2.

  3. xe2xdx=x(12e2x)(12e2x)dx\int x e^{-2x}\,dx = x \cdot \left(-\frac{1}{2}e^{-2x}\right) - \int \left(-\frac{1}{2}e^{-2x}\right)\,dx

    Apply Integration by Parts: udv=uvvdu\int u\,dv = uv - \int v\,du.

  4. =12xe2x+12e2xdx= -\frac{1}{2}xe^{-2x} + \frac{1}{2}\int e^{-2x}\,dx

    Simplify and factor out the constant 12\frac{1}{2} from the remaining integral.

  5. =12xe2x+12(12e2x)+C= -\frac{1}{2}xe^{-2x} + \frac{1}{2} \cdot \left(-\frac{1}{2}e^{-2x}\right) + C

    Integrate e2xe^{-2x} to get 12e2x-\frac{1}{2}e^{-2x}.

  6. =12xe2x14e2x+C= -\frac{1}{2}xe^{-2x} - \frac{1}{4}e^{-2x} + C

    Simplify the arithmetic by multiplying the fractions.

Answer: 12xe2x14e2x+C-\frac{1}{2}xe^{-2x} - \frac{1}{4}e^{-2x} + C

This example involves negative exponents and fractions, requiring careful attention when computing vv and managing coefficients. The polynomial times exponential pattern appears frequently in applications, making Integration by Parts the natural choice when u-substitution cannot eliminate the polynomial factor.

3. Garden fencing cost problem

Problem

A rectangular garden plot needs a curved fence. The labor cost at distance xx meters from the entrance is (x+1)ex(x+1)e^{-x} dollars per meter. Find (x+1)exdx\int (x+1)e^{-x}\,dx to determine the cumulative cost function.
  1. u=x+1,dv=exdxu = x+1, \quad dv = e^{-x}\,dx

    Choose the linear polynomial x+1x+1 as uu because differentiation eliminates it to a constant.

  2. du=dx,v=exdu = dx, \quad v = -e^{-x}

    Differentiate uu to get dxdx, and integrate dvdv using exdx=ex\int e^{-x}\,dx = -e^{-x}.

  3. (x+1)exdx=(x+1)(ex)(ex)dx\int (x+1)e^{-x}\,dx = (x+1) \cdot (-e^{-x}) - \int (-e^{-x})\,dx

    Apply the Integration by Parts formula.

  4. =(x+1)ex+exdx= -(x+1)e^{-x} + \int e^{-x}\,dx

    Simplify by distributing the negative and rewriting the integral with positive sign.

  5. =(x+1)exex+C= -(x+1)e^{-x} - e^{-x} + C

    Integrate exe^{-x} to get ex-e^{-x}.

  6. =ex(x+2)+C= -e^{-x}(x+2) + C

    Factor out ex-e^{-x} to write the answer in simplified form.

Answer: (x+1)exex+C or ex(x+2)+C-(x+1)e^{-x} - e^{-x} + C \text{ or } -e^{-x}(x+2) + C

This real-world scenario shows how Integration by Parts models cumulative costs in practical settings. The product of a linear term and an exponential decay factor is typical in economics and engineering; integrating by parts cleanly separates the polynomial's contribution from the exponential's behavior.

Common mistakes

Where Integration by Parts usually goes wrong
Answer came out wrong
Writing udv=uv+vdu\int u\,dv = uv + \int v\,du instead of uvvduuv - \int v\,du.
Always write the formula as udv=uvvdu\int u\,dv = uv - \int v\,du and double-check the minus sign when substituting.
Choosing uu to be the exponential or trigonometric function (e.g., u=exu = e^x when the integrand is xexx e^x), then finding that vdu\int v\,du is much harder than the original integral.
Use the LIATE rule: prioritize Logarithmic, Inverse trig, Algebraic (polynomial), Trigonometric, Exponential. If the resulting integral is harder, stop and swap your choice of uu and dvdv.
Forgetting to write +C+ C at the end of an indefinite integral, or writing it during intermediate steps before integration is complete.
Omit +C+ C in all intermediate steps and add it only to the final simplified result.
The mistakeWhy it is wrongThe fix
Writing udv=uv+vdu\int u\,dv = uv + \int v\,du instead of uvvduuv - \int v\,du.The negative sign comes directly from the product rule: (uv)=uv+uv(uv)' = u'v + uv' rearranges to uv=(uv)uvu'v = (uv)' - uv', which becomes udv=uvvdu\int u\,dv = uv - \int v\,du when integrated.Always write the formula as udv=uvvdu\int u\,dv = uv - \int v\,du and double-check the minus sign when substituting.
Choosing uu to be the exponential or trigonometric function (e.g., u=exu = e^x when the integrand is xexx e^x), then finding that vdu\int v\,du is much harder than the original integral.The goal of Integration by Parts is to make the new integral vdu\int v\,du simpler than the original. Prioritizing uu incorrectly defeats the purpose and creates harder work.Use the LIATE rule: prioritize Logarithmic, Inverse trig, Algebraic (polynomial), Trigonometric, Exponential. If the resulting integral is harder, stop and swap your choice of uu and dvdv.
Forgetting to write +C+ C at the end of an indefinite integral, or writing it during intermediate steps before integration is complete.The constant of integration represents all antiderivatives and belongs only at the final answer. Including it mid-derivation suggests the integration is finished when it is not.Omit +C+ C in all intermediate steps and add it only to the final simplified result.

Tips and when to use something else

  • Remember the LIATE rule to choose uu: prioritize Logarithmic, Inverse trig, Algebraic (polynomial), Trigonometric, and Exponential functions in that order. Choose uu from whichever category your integrand contains first.
  • If the integral vdu\int v\,du is harder than the original, you chose uu and dvdv backward. Stop and switch them, or try u-substitution on a different part of the integrand.
  • For integrals like xnexdx\int x^n e^x\,dx, use Integration by Parts; for integrals like ex2dx\int e^{x^2}\,dx (no elementary antiderivative), Integration by Parts cannot help—use numerical integration or the error function instead.
  • When Integration by Parts produces a cycle (e.g., applying it twice to exsin(x)dx\int e^x \sin(x)\,dx returns a multiple of the original integral), rearrange the equation algebraically to solve for the unknown integral rather than applying Integration by Parts a third time.

Frequently asked questions

When should I use Integration by Parts versus u-substitution?
Use u-substitution when the integrand is a composite function and the derivative of the inner function appears in the integrand. Use Integration by Parts when you have a product of two functions where u-substitution does not directly apply, such as xexx e^x, xsin(x)x \sin(x), or xln(x)x \ln(x).
How do I remember the Integration by Parts formula?
A common mnemonic is "U-dV equals U-V minus V-dU," which rhymes with the formula udv=uvvdu\int u\,dv = uv - \int v\,du. Another memory aid: think of it as reversing the product rule for derivatives, which says (uv)=uv+uv(uv)' = u'v + uv'.
What do I do if I choose uu and dvdv incorrectly?
If your resulting integral vdu\int v\,du is harder than the original, you made a poor choice. Try switching your assignments or select a different uu entirely using the LIATE rule to guide you toward a better pairing.
Can I use Integration by Parts on ex2dx\int e^{x^2}\,dx?
No. There is no elementary antiderivative for ex2e^{x^2}, so Integration by Parts cannot help you evaluate it in closed form. This integral requires numerical methods or special functions like the error function.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18