ThisCalculator

Everyday

Change of Variable Formula & How to Use It

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Change of Variable Formula & How to Use It

This calculator performs a change of variable (also called u-substitution) for definite integrals: you enter an integral in the form ∫ab f(g(x))·g′(x) dx, and it returns the equivalent integral in terms of u = g(x), including the new limits of integration. You provide the functions f(u) and g(x) as text expressions, and the lower and upper limits a and b; the calculator computes the new limits g(a) and g(b) and shows the transformed integral ready to evaluate.

Formula

The change of variable formula for definite integrals is:

∫ab f(g(x))·g′(x) dx = ∫g(a)g(b) f(u) du

where:

  • u = g(x) – the substitution function (must be differentiable on [a,b])
  • du = g′(x) dx – the differential relationship
  • a, b – original limits of integration (real numbers)
  • g(a), g(b) – new limits after substitution
  • f(u) – the integrand expressed in terms of u

For indefinite integrals, the formula is simply ∫ f(g(x))·g′(x) dx = ∫ f(u) du, evaluated at u = g(x) at the end.

Worked Example

Using the defaults: f(u) = u², g(x) = x² + 1, a = 0, b = 2.

  1. Identify u = g(x) = x² + 1.
  2. Compute du/dx = 2x, so du = 2x dx. (In the original integral, the factor 2x must be present; if not, you adjust constants.)
  3. Compute new limits: g(0) = 0² + 1 = 1; g(2) = 2² + 1 = 5.
  4. The transformed integral is ∫15 u² du.
  5. Evaluate: [u³/3]15 = (125/3) – (1/3) = 124/3 ≈ 41.333.

The calculator shows the new limits (1 and 5) and the transformed integral; you then integrate f(u) with respect to u.

Why the Change of Variable Works

The formula is a direct consequence of the chain rule for derivatives. If F is an antiderivative of f, then the derivative of F(g(x)) is F′(g(x))·g′(x) = f(g(x))·g′(x). Therefore, the integral of f(g(x))·g′(x) is F(g(x)), and evaluating from a to b gives F(g(b)) – F(g(a)), which is exactly the integral of f from g(a) to g(b). This is sometimes called the “reverse chain rule.�

How to Choose the Substitution

There is no universal algorithm, but common patterns help:

  • Look for a function and its derivative inside the integrand (e.g., x·cos(x²) → u = x²).
  • For expressions with √(a² – x²), try x = a·sin(θ) (trigonometric substitution).
  • For √(x² + a²), try x = a·tan(θ).
  • For √(x² – a²), try x = a·sec(θ).
  • For rational functions, sometimes u = denominator or u = a linear factor works.

After choosing u, compute du and rewrite the entire integrand in terms of u. If any x remains, the substitution is not complete.

Common Mistakes and Pitfalls

  • Forgetting to change limits – for definite integrals, you must replace a and b with g(a) and g(b); otherwise you get a wrong numeric answer.
  • Not adjusting for missing constants – if the integrand has g′(x) but with a different coefficient, you can multiply by a constant inside and compensate outside (e.g., ∫ x·e^(x²) dx: u = x², du = 2x dx, so you need a factor 1/2).
  • Treating u as a constant – after substitution, the integral must contain only u and du, not x.
  • Ignoring differentiability – g must be differentiable on the interval; if g′ is zero or undefined, the formula may fail.
  • Rounding intermediate steps – keep exact values (fractions, radicals) until the final answer.

Limits of the Formula

The change of variable formula requires that g be continuously differentiable on [a,b] and that f be continuous on the range of g. If g is not one-to-one, the formula still works for definite integrals as long as you use the correct new limits (g(a) and g(b)), but for indefinite integrals you must substitute back to x. For improper integrals (infinite limits or discontinuities), you must treat them as limits first. The formula does not apply to multiple integrals without additional Jacobian factors.

Frequently Asked Questions

What is the difference between u-substitution and change of variable?

They are the same thing. “u-substitution� is the common name in calculus courses; “change of variable� is the more general term used in higher mathematics and statistics (e.g., transformation of random variables).

Can I use the change of variable for indefinite integrals?

Yes. For ∫ f(g(x))·g′(x) dx, set u = g(x), du = g′(x) dx, integrate ∫ f(u) du, then replace u with g(x) in the result. No limits are changed because there are none.

What if the integrand does not have the exact derivative of g(x)?

You can often introduce a constant factor. For example, ∫ x·e^(x²) dx: u = x², du = 2x dx, so x dx = du/2. The integral becomes (1/2)∫ e^u du. If the factor is not a constant (e.g., x² instead of x), that substitution will not work directly; try a different u.

Why do we change the limits for definite integrals?

Because the integral is evaluated with respect to u, and the original x-limits correspond to specific u-values via u = g(x). Using the original limits with u would give a different (usually wrong) number. Changing limits avoids the need to substitute back.

Does the formula work if g is not one-to-one?

For definite integrals, yes, as long as g is differentiable and f is continuous on the range. The new limits are simply g(a) and g(b). For indefinite integrals, you must substitute back to x, and the result is still valid if g is differentiable.

What is the Jacobian in multiple variables?

For a change of variables in a double or triple integral, you multiply by the absolute value of the Jacobian determinant, which accounts for how areas/volumes stretch. For a single variable, the “Jacobian� is just |g′(x)|, but the formula uses g′(x) dx = du without absolute value because the limits handle orientation.

Related

Formula used
in f | f(u) expression | - | u^2 | 0
in g | g(x) expression | - | x^2 + 1 | 0
in a | Lower limit a | - | 0 | 0
in b | Upper limit b | - | 2 | 0
out u_a | New lower limit g(a) | - | g(a) | 2
out u_b | New upper limit g(b) | - | g(b) | 2
out du | du/dx = g'(x) | - | derivative(g,x) | 2
out result | Transformed integral | - | ∫ f(u) du from g(a) to g(b) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.