U-Substitution Calculator

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

This U-Substitution Calculator integrates composite functions where the derivative of an inner function also appears, such as 2x(x^2 + 1)^5 or 2x cos(x^2). It reverses the chain rule: substitute u for the inside, rewrite the integral in u, integrate, and substitute back.

Step-by-step method

  1. Set up the integral.
  2. Choose the inner function u and compute du.
  3. Rewrite the whole integral in terms of u.
  4. Integrate with respect to u.
  5. Substitute back to x and add C.

Formula:

\(\int f\left(g\left(x\right)\right) g'\left(x\right)\, dx = \int f\left(u\right) \, du, \quad u = g\left(x\right)\)

Example 1:

\(\int 2 x \left(x^{2} + 1\right)^{5}\, dx\)

Step 1 - Set up the integral.

In this problem: We are integrating \(2 x \left(x^{2} + 1\right)^{5}\). It contains an inner function whose derivative also appears as a factor.

\(\int 2 x \left(x^{2} + 1\right)^{5}\, dx\)

Step 2 - Write the u-substitution formula.

In this problem: When the integrand is a composite times the derivative of its inside, substitute u for the inside.

\(\int f\left(g\left(x\right)\right) g'\left(x\right)\, dx = \int f\left(u\right) \, du, \quad u = g\left(x\right)\)

Step 3 - Choose the inner function u and compute du.

In this problem: Let \(u = x^{2} + 1\). Then \(du = 2 x \, dx\).

\(\begin{gathered} u = x^{2} + 1 \\ du = 2 x\, dx \end{gathered}\)

Step 4 - Rewrite the whole integral in terms of u.

In this problem: The remaining factor becomes \(u^{5}\) in terms of u.

\(\int 2 x \left(x^{2} + 1\right)^{5}\, dx = \int u^{5} \, du\)

Step 5 - Integrate with respect to u.

In this problem: Integrating gives \(\frac{u^{6}}{6}\).

\(\int u^{5} \, du = \frac{u^{6}}{6} + C\)

Step 6 - Substitute back to x and add C.

In this problem: Replace u with \(x^{2} + 1\).

\(\int 2 x \left(x^{2} + 1\right)^{5}\, dx = \frac{\left(x^{2} + 1\right)^{6}}{6} + C\)

Final answer:

\(\int 2 x \left(x^{2} + 1\right)^{5}\, dx = \frac{\left(x^{2} + 1\right)^{6}}{6} + C\)

Example 2:

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

Step 1 - Set up the integral.

In this problem: We are integrating \(2 x \cos{\left(x^{2} \right)}\). It contains an inner function whose derivative also appears as a factor.

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

Step 2 - Write the u-substitution formula.

In this problem: When the integrand is a composite times the derivative of its inside, substitute u for the inside.

\(\int f\left(g\left(x\right)\right) g'\left(x\right)\, dx = \int f\left(u\right) \, du, \quad u = g\left(x\right)\)

Step 3 - Choose the inner function u and compute du.

In this problem: Let \(u = x^{2}\). Then \(du = 2 x \, dx\).

\(\begin{gathered} u = x^{2} \\ du = 2 x\, dx \end{gathered}\)

Step 4 - Rewrite the whole integral in terms of u.

In this problem: The remaining factor becomes \(\cos{\left(u \right)}\) in terms of u.

\(\int 2 x \cos{\left(x^{2} \right)}\, dx = \int \cos{\left(u \right)} \, du\)

Step 5 - Integrate with respect to u.

In this problem: Integrating gives \(\sin{\left(u \right)}\).

\(\int \cos{\left(u \right)} \, du = \sin{\left(u \right)} + C\)

Step 6 - Substitute back to x and add C.

In this problem: Replace u with \(x^{2}\).

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

Final answer:

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