Integration by Parts Calculator

Published on: July 18, 2026
Final Answer: Free Full Steps: Plus

This Integration by Parts Calculator integrates products of two different kinds of functions, such as x e^x, x cos(x), or ln(x). It reverses the product rule using the formula ∫u dv = uv − ∫v du, choosing u by the LIATE priority.

Step-by-step method

  1. Set up the integral.
  2. Write the integration by parts formula.
  3. Choose u and dv (LIATE: Log, Inverse trig, Algebraic, Trig, Exponential).
  4. Differentiate u and integrate dv.
  5. Substitute into the formula.
  6. Evaluate the remaining integral and simplify, adding C.

Formula:

\(\int u \, dv = uv - \int v \, du\)

Example 1:

\(\int x e^{x}\, dx\)

Step 1 - Set up the integral.

In this problem: We are integrating a product of two different kinds of functions.

\(\int x e^{x}\, dx\)

Step 2 - Write the integration by parts formula.

In this problem: Integration by parts trades one integral for a hopefully easier one.

\(\int u \, dv = uv - \int v \, du\)

Step 3 - Choose u and dv (LIATE: Log, Inverse trig, Algebraic, Trig, Exponential).

In this problem: By LIATE, choose \(u = x\) and \(dv = e^{x} \, dx\).

\(\begin{gathered} u = x \\ dv = e^{x}\, dx \end{gathered}\)

Step 4 - Differentiate u and integrate dv.

In this problem: Differentiating u gives \(du = 1 \, dx\); integrating dv gives \(v = e^{x}\).

\(\begin{gathered} du = 1\, dx \\ v = e^{x} \end{gathered}\)

Step 5 - Substitute into the formula.

In this problem: Substitute u, v, and du into the formula.

\(\int x e^{x}\, dx = \left(x\right)\left(e^{x}\right) - \int e^{x}\, dx\)

Step 6 - Evaluate the remaining integral and simplify, adding C.

In this problem: The remaining integral evaluates to \(e^{x}\). Simplifying gives the answer.

\(\int x e^{x}\, dx = x e^{x} - e^{x} + C\)

Final answer:

\(\int x e^{x}\, dx = x e^{x} - e^{x} + C\)

Example 2:

\(\int x \cos{\left(x \right)}\, dx\)

Step 1 - Set up the integral.

In this problem: We are integrating a product of two different kinds of functions.

\(\int x \cos{\left(x \right)}\, dx\)

Step 2 - Write the integration by parts formula.

In this problem: Integration by parts trades one integral for a hopefully easier one.

\(\int u \, dv = uv - \int v \, du\)

Step 3 - Choose u and dv (LIATE: Log, Inverse trig, Algebraic, Trig, Exponential).

In this problem: By LIATE, choose \(u = x\) and \(dv = \cos{\left(x \right)} \, dx\).

\(\begin{gathered} u = x \\ dv = \cos{\left(x \right)}\, dx \end{gathered}\)

Step 4 - Differentiate u and integrate dv.

In this problem: Differentiating u gives \(du = 1 \, dx\); integrating dv gives \(v = \sin{\left(x \right)}\).

\(\begin{gathered} du = 1\, dx \\ v = \sin{\left(x \right)} \end{gathered}\)

Step 5 - Substitute into the formula.

In this problem: Substitute u, v, and du into the formula.

\(\int x \cos{\left(x \right)}\, dx = \left(x\right)\left(\sin{\left(x \right)}\right) - \int \sin{\left(x \right)}\, dx\)

Step 6 - Evaluate the remaining integral and simplify, adding C.

In this problem: The remaining integral evaluates to \(- \cos{\left(x \right)}\). Simplifying gives the answer.

\(\int x \cos{\left(x \right)}\, dx = x \sin{\left(x \right)} + \cos{\left(x \right)} + C\)

Final answer:

\(\int x \cos{\left(x \right)}\, dx = x \sin{\left(x \right)} + \cos{\left(x \right)} + C\)