Math Solver Free

Substitution Calculator

U-substitution, step by step: u, du, the rewritten integral, and the answer in x.

Result
(1/2)*(e^(x^2)) + C

U-substitution, step by step

1. Let u = x^2.

2. Differentiate: du = (2x) dx.

3. The remaining factor is 1/2 times g'(x), so it becomes 1/2 du.

4. Rewrite with u: the integral becomes 1/2 * ∫ e^u du.

5. Integrate in u: (1/2)*(e^(u)).

6. Substitute back u = x^2: (1/2)*(e^(x^2)) + C.

What Is U-Substitution?

Substitution is the integration technique for undoing the chain rule: when an integrand contains a composite function together with its derivative, renaming the inner function u turns an intimidating integral into a basic one. This substitution calculator finds that substitution for the standard chain forms — powers like (3x + 2)^4, exponentials like x·e^(x^2), logarithms like (2x)/(x^2 + 1), roots like x/sqrt(x^2 + 4), and trig forms like cos(x)·e^(sin x) — and lays out the complete solution: the choice of u, the computation of du, any constant adjustment, the integral rewritten in u, and the final back-substitution, with the answer verified by differentiation.

How U-Substitution Works, Step by Step

  1. Choose u: the inner function of the composition — here, whatever sits inside the power, exponent, root, denominator or trig function.
  2. Compute du = u′(x) dx and locate that exact piece inside the integrand.
  3. Adjust constants if needed: if the integrand has half of du, multiply the integral by the reciprocal outside — constants are free to move.
  4. Rewrite and integrate in u using the basic rules (power, exponential, log, trig).
  5. Substitute back to x and add C. Then check by differentiating — the calculator does this numerically on every answer.

Worked Example 1: Integrating (3x + 2)^4

The composition is the power: the outer function is (·)^4 and the inner function is 3x + 2. Set u = 3x + 2, so du = 3 dx and dx = du/3. The integral becomes (1/3)∫u^4 du = (1/3)(u^5/5) = u^5/15. Back-substituting: (3x + 2)^5/15 + C. Differentiate to check: the chain rule gives 5(3x + 2)^4·3/15 = (3x + 2)^4 — the 3 from the chain rule is precisely what the 1/3 adjustment paid for.

Worked Example 2: Integrating (2x)/(x^2 + 1)

Here the inner function is in the denominator: u = x^2 + 1, and du = 2x dx is sitting in the numerator exactly. The integral becomes ∫du/u = ln|u| + C, so the answer is ln(x^2 + 1) + C (the absolute value can drop because x^2 + 1 is always positive). This numerator-is-the-derivative-of-the-denominator pattern is the most recognisable substitution in calculus — it always produces a logarithm.

Worked Example 3: Integrating x·sin(x^2)

Trig functions of a squared variable look impossible until you notice the x standing outside: it is the derivative of the inside, up to a constant. Set u = x^2, so du = 2x dx and x dx = du/2. The integral becomes (1/2)∫sin(u) du = −(1/2)cos(u) + C, and back-substituting gives −(1/2)cos(x^2) + C. The same shape recurs constantly: (sin x)^3·cos x takes u = sin x and becomes u^4/4; e^(5x) takes u = 5x and becomes e^(5x)/5; x/sqrt(x^2 + 4) takes u = x^2 + 4 and becomes sqrt(x^2 + 4). In every case the recipe is identical — find the inner function whose derivative is also present — and the calculator's step panel names that inner function explicitly, which is the observation that makes the technique learnable.

Substitution vs the Antiderivative and Integral Calculators

The three integration tools on this site divide the work by technique. The antiderivative calculator handles sums of basic forms term by term — no substitution needed. The integral calculator covers definite integrals and numeric evaluation. This page is the specialist: it exists to teach and execute the one technique, showing the u and du reasoning that a general answer key hides. If an integral needs parts or partial fractions rather than substitution, those are different techniques — the honest message this calculator gives when it cannot find a working u.

Three Mistakes to Watch For

First, forgetting to convert dx: every piece of the integrand, including dx, must be rewritten in u — mixing x and u in one integral is the classic error. Second, adjusting by a variable instead of a constant: you may multiply by 1/2, never by 1/x. Third, forgetting to substitute back at the end — an answer in u is not an answer to a question asked in x. Each step panel in the calculator exists to make one of these mistakes visible before it happens.

Frequently Asked Questions

What is u-substitution?

U-substitution is the chain rule read backwards. If an integral contains a composite function g(x) together with (a constant multiple of) its derivative g'(x), you set u = g(x), replace g'(x) dx with du, and the integral becomes a basic one in u — a power, exponential, logarithm or trig form you can integrate directly. Then you substitute back. Every successful u-substitution is undoing a chain-rule differentiation, which is why spotting the inner function and its derivative is the whole skill.

How do you integrate x*e^(x^2) by substitution?

Set u = x^2, the exponent. Then du = 2x dx, so x dx = du/2. The integral becomes (1/2) times the integral of e^u du, which is (1/2)e^u + C. Substituting back gives (1/2)e^(x^2) + C. Notice the x in front was not decoration — it is exactly the factor du/dx needs, up to the constant 2, which slides outside the integral. This is the calculator's default example.

How do you choose u in u-substitution?

Pick the inner function of a composition: the exponent of e, the inside of a root, the denominator of a fraction, the angle of a trig function, or the base being raised to a power. The test is whether the rest of the integrand is (up to a constant) that function's derivative. A reliable order of attempts is the LIATE-style instinct in reverse: look inside logarithms and inverse trig first, then roots and denominators, then exponents and trig angles. If du does not appear, the choice fails — pick another piece.

What if du is off by a constant?

Constants are adjustable, variables are not. If the integral has x dx but du = 2x dx, you may multiply and divide by 2 — constants move freely across the integral sign. But if the leftover factor contains x in a way no constant fixes (for example, an extra x^2 after using all of du), the substitution has failed and the leftover must be expressible purely in u. This calculator performs the constant adjustment for you and shows it as its own step; when the leftover genuinely contains x, it says so rather than forcing an answer.

What integrals cannot be done by substitution?

Integrals with no composite structure (plain polynomials — use the power rule directly), products of unrelated functions like x*sin(x) (that is integration by parts), and famously non-elementary integrals like e^(x^2) alone or sin(x^2), whose antiderivatives are not expressible in elementary functions at all. The calculator handles the standard chain forms — powers, exponentials, logs, roots and trig of polynomial inner functions — and declines the rest honestly.

Is this substitution calculator free?

Yes — every tool on Math Solver Free is free with no sign-up, and all calculations run in your browser. Type your integrand in x; the calculator finds the substitution, shows u, du, the constant adjustment and each step to the final answer, and verifies the result numerically by differentiating it. For integrals that need no substitution, use the antiderivative calculator or the integral calculator.

Related Tools & Guides

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team