Change of variable in integrals

Substitute variables while preserving limits, the differential, and physical meaning.

What it is

Change of variable (or substitution) in integrals is a technique that replaces the original integration variable with a new one, strategically chosen to simplify the integrand. If u=g(x), then du=g'(x)dx, and the integral ∫f(g(x))g'(x)dx transforms into ∫f(u)du, generally simpler to solve.

This technique is essentially the integrated version of the chain rule for derivatives: just as the chain rule allows differentiating composite functions, change of variable allows integrating expressions that are the result of applying that rule, recognizing the pattern f(g(x))g'(x) and reversing the process.

Why it appears in physics

It appears because many physical quantities are naturally expressed in one variable, but the integral that needs to be solved is greatly simplified by changing to another related variable: for example, integrating with respect to an angle instead of a Cartesian coordinate when the problem has circular symmetry, or changing from temperature to internal energy when working with thermodynamic distributions.

In electromagnetism and field physics, change of variable allows simplifying integrals over charge or mass distributions when the geometry of the problem suggests more natural coordinates (such as moving from Cartesian to polar, cylindrical, or spherical coordinates), reducing apparently very complicated integrals to manageable forms.

Visual or geometric idea

The visual idea is that of "changing perspective" to see the same problem more simply: just as looking at a rotated object from a different angle can reveal a symmetry that was not obvious from the original angle, changing the integration variable can reveal a simpler structure in the integrand that was not evident in the original variable.

Geometrically, one can also think of it as a "rescaling" of the integration axis: when we change from x to u=g(x), we are deforming the horizontal axis of the integral, and the factor du=g'(x)dx exactly compensates for that deformation so that the calculated area (or integral) remains correct.

Minimal symbolic language

The general process is: identify a substitution u=g(x) such that du=g'(x)dx appears (or can be made to appear) in the integrand, rewrite the entire integral in terms of u and du, and solve the resulting integral in the new variable.

For definite integrals, it is crucial to also change the integration limits: if x goes from a to b, then u goes from g(a) to g(b), and these new limits are used directly in the integral in variable u, without needing to return to the original variable at the end.

What the result means

The result of an integral solved by change of variable is exactly the same value (numerical or symbolic) that would have been obtained by solving the original integral in the starting variable, since the change of variable is a mathematically equivalent transformation, not an approximation.

When working with definite integrals and correctly changing the limits, the final result is already correctly expressed without needing to "undo" the substitution, which simplifies the process compared to indefinite integrals where it is indeed necessary to return to the original variable at the end.

When not to use it

Do not apply a change of variable if you cannot clearly identify a function g(x) whose derivative g'(x) appears (or can be generated through simple algebraic manipulation) in the integrand: forcing a substitution without that structure usually complicates the problem instead of simplifying it.

Also do not forget to change the integration limits when working with definite integrals: leaving the limits in the original variable while the integrand is in the new variable produces a mathematically meaningless result.

Operational summary

Identify a substitution u=g(x) that simplifies the integrand, calculate du=g'(x)dx and check that it appears in the original integral, rewrite the entire integral (including the limits if definite) in terms of the new variable, solve the resulting integral, and if it is an indefinite integral, substitute back u=g(x) to express the result in the original variable.

Procedure

Before calculating

Examine the integrand looking for a composite function or a pattern where the derivative of one part multiplies the rest: that is the signal that a change of variable can simplify the integral.

Decide whether the integral is definite or indefinite, since this determines whether you also need to change the integration limits.

Step 1: identify the mathematical object

Propose a substitution u=g(x) for the "inner" part of the identified composite function, and explicitly calculate du=g'(x)dx.

Check that du (or a constant multiple of du) actually appears in the original integrand; if it does not appear, reconsider the choice of u.

Step 2: choose the operation

Rewrite the entire integrand in terms of u, replacing both g(x) by u and g'(x)dx by du (adjusting constants if necessary).

If the integral is definite, calculate the new limits by evaluating g(a) and g(b), where a and b are the original limits in x.

Step 3: preserve units and signs

Check that the substitution does not introduce dimensional inconsistencies: if x has certain units, u=g(x) may have different units, and you must ensure that the final result, after undoing the substitution (if indefinite) or evaluating at the new limits (if definite), has the correct physical units.

Pay attention to signs when calculating the new limits: if g(x) is decreasing, the upper limit in x may correspond to the lower limit in u, reversing the order.

Step 4: calculate

Solve the resulting integral in variable u, which should be simpler than the original integral thanks to the chosen substitution.

If the integral is indefinite, substitute back u=g(x) into the final result to express it in the original variable x. If definite, evaluate directly at the new limits without needing to undo the substitution.

Step 5: interpret the result

Check that the obtained result, expressed in the appropriate variable, makes physical and dimensional sense in the context of the original problem.

If useful, check the result by differentiating it back (for indefinite integrals) or by comparing it with an approximate numerical estimate (for definite integrals).

Self-check checklist

Check that you correctly identified the substitution before rewriting the integral, that du (with its corresponding constant) actually appears in the integrand, that you correctly changed the limits if the integral is definite, and that the final result is expressed in the correct variable according to the type of integral.

Guided example

Physical situation

The task is to calculate the work done in compressing a spring, given by W = ∫₀^d kx dx, but using a change of variable to check the result through a substitution u=kx, where k is the spring constant and d is the compression distance.

Mathematical translation

With u=kx, du=k dx, so dx=du/k. When x=0, u=0; when x=d, u=kd. The integral transforms into ∫₀^(kd) (u/k)(du/k) = (1/k²)∫₀^(kd) u du.

Step-by-step calculation

(1/k²)∫₀^(kd) u du = (1/k²)[u²/2]₀^(kd) = (1/k²)(k²d²/2) = d²k/2... rewriting correctly: (1/k²)(k²d²/2 - 0) = kd²/2. This matches the known result W = ½kd² obtained directly without substitution.

Reading the result

The result W = ½kd² (in joules, with k in N/m and d in meters) represents the total work needed to compress the spring a distance d, and matches exactly the result obtained without change of variable, confirming the substitution was applied correctly.

Common error avoided

This avoids the error of leaving the integration limits in variable x (0 and d) while integrating in variable u: that would have produced a meaningless expression, inconsistently mixing variables.

Inverse example

Given result

When solving an integral related to the velocity distribution of particles in a gas (Maxwell-Boltzmann distribution), a change of variable u=v² (where v is velocity) is applied to transform the integral into a recognizable form related to the gamma function.

What physical question it can answer

This change of variable allows calculating statistical quantities of the gas, such as mean velocity or root-mean-square velocity, recognizing that the original integral in v becomes a standard integral in u with a known solution in terms of special functions, avoiding having to solve the original integral directly in variable v, which would be much more complicated to handle.

Common errors

Error 1: forgetting to change the integration limits

It seems reasonable to change the integrand to the new variable but leave the integration limits at the original x values. It fails because the limits must correspond to the new variable u, not to x; using the original limits with the transformed integrand inconsistently mixes two variable systems. Detect it by checking whether the integration limits are expressed in the same variable as the integrand. Correct it by explicitly calculating g(a) and g(b) to obtain the new limits in u. Mini-example: when substituting u=x² in an integral with limits x=0 to x=2, the new limits must be u=0 to u=4, not still using 0 and 2.

Error 2: not checking that du appears in the integrand

It seems reasonable to choose any substitution u=g(x) without checking that its derivative g'(x) (or a constant multiple of it) actually appears in the original integrand. It fails because if du does not appear, the substitution does not simplify the integral and the setup remains incomplete or incorrect. Detect it by explicitly calculating du and looking for it in the original expression before proceeding. Correct it by reconsidering the choice of u if du does not appear recognisably. Mini-example: for ∫x² e^(x³) dx, the choice u=x³ works because du=3x²dx appears (up to a constant); a choice like u=x² would not work the same way.

Error 3: forgetting to substitute back in indefinite integrals

It seems reasonable to leave the final result of an indefinite integral expressed in variable u, without substituting back to the original variable x. It fails because the original problem was posed in x, and a result in u does not directly answer the original question unless the relation between both variables is explicitly stated. Detect it by checking whether the final result contains variable u instead of x (for indefinite integrals). Correct it by substituting u=g(x) back into the result before presenting it as the final answer. Mini-example: if u=x²+1, the final result must be expressed in terms of x²+1, not left as a function of u without context.

Error 4: ignoring the sign when reversing limits when g(x) is decreasing

It seems reasonable to assume the lower limit in x always corresponds to the lower limit in u, without checking whether the substitution function g(x) is increasing or decreasing. It fails because if g(x) is decreasing, the order of the limits reverses when changing variables, and not adjusting this correctly introduces a sign error in the final result. Detect it by explicitly checking the values of g(a) and g(b) and their relative order. Correct it by using the limits in the correct order according to the calculated values, without assuming the order is automatically preserved. Mini-example: if u=1-x and x goes from 0 to 1, then u goes from 1 to 0 (reversed order), and this must be correctly reflected in the resulting integral.

Error 5: forcing an unnecessarily complicated substitution

It seems reasonable to attempt an elaborate change of variable for an integral that is actually more easily solved with a simpler technique (direct integration, or a more obvious substitution). It fails because forcing a complex substitution when it is not necessary complicates the process and increases the likelihood of errors. Detect it by asking whether there is a more direct way to solve the integral before committing to an elaborate substitution. Correct it by first exploring simpler options before resorting to complex substitutions. Mini-example: ∫2x dx needs no change of variable at all, since it integrates directly to x²+C.

Quick detection rule

If the integration limits were left in the original variable while the integrand is in the new variable, if du does not clearly appear in the integrand before substituting, or if the final result of an indefinite integral is still expressed in the auxiliary variable u, the error is probably in the setup of the change of variable, not in the final calculation.

Physical applications

1. Change to polar coordinates in problems with circular symmetry

It appears when integrating over charge, mass, or field distributions that have circular symmetry, changing from Cartesian coordinates (x,y) to polar (r,θ) to drastically simplify the integration limits. It is calculated by substituting x=r cos(θ), y=r sin(θ), and using the corresponding Jacobian (r dr dθ) as the new area element. The result simplifies integrals that would be extremely complicated in Cartesian coordinates. The dangerous error is forgetting to include the r factor of the Jacobian when changing to polar coordinates. As a final control, the learner must explain why that r factor is dimensionally necessary.

2. Velocity distributions in statistical physics

It appears when calculating statistical quantities of a gas (mean velocity, mean energy) from the Maxwell-Boltzmann distribution, where a change of variable (such as u=v² or u=mv²/2kT) simplifies the integral to a recognizable form related to special functions. It is calculated by identifying the substitution that converts the integrand into a standard form. The result gives macroscopic quantities of the gas from its microscopic velocity distribution. The dangerous error is not correctly adjusting the integration limits when changing variables, especially if the new variable has a different range. As a final control, the learner must explain why velocity, which goes from 0 to infinity, requires special care when changing variables.

3. Thermodynamics and change of state variables

It appears when calculating thermodynamic integrals where it is more natural to work with a state variable different from the original (for example, changing from volume to pressure using the equation of state, or from temperature to internal energy). It is calculated by expressing the differential of the original variable in terms of the new variable using the relation between them. The result allows calculating work or heat in thermodynamic processes more directly in the new variable. The dangerous error is not checking that the relation between the state variables is valid over the entire considered integration range. As a final control, the learner must explain why a thermodynamic change of variable is only valid within the domain where the equation of state holds.

4. Relativity and change to proper time

It appears when integrating over trajectories in spacetime, changing from the observer's time coordinate to the proper time of a moving particle, through the relation between them given by the Lorentz factor. It is calculated by substituting the observer's time differential with the proper time differential multiplied by the corresponding Lorentz factor. The result allows calculating accumulated quantities (such as the relativistic action) consistently between different observers. The dangerous error is applying the Lorentz factor incorrectly, confusing which time is proper and which is that of the external observer. As a final control, the learner must explain why proper time is always less than or equal to the time measured by an external observer.

5. Waves and change to phase variables

It appears when integrating wave functions or periodic functions, changing the spatial or temporal variable to a dimensionless phase variable (such as u=kx-ωt), simplifying the integral by removing the specific physical parameters (wave number k, angular frequency ω) from the integrand. It is calculated by identifying the combination of variables that forms the wave's phase and substituting that combination as the new variable. The result gives a standard integral in terms of the phase, which can then be reinterpreted physically. The dangerous error is forgetting the corresponding scale factor (k or ω) when calculating the differential of the new variable. As a final control, the learner must explain why the phase of a wave is a dimensionless quantity even though it is built from quantities with units.

Practice

Level 1: recognition

Identify, for three given integrals, which substitution u=g(x) would simplify each, checking that du appears in the integrand.

Exercise: for ∫2x cos(x²) dx, identify the appropriate substitution and check that du appears in the integrand.

Level 2: direct application

Solve a simple definite integral by applying a change of variable, correctly changing the integration limits.

Exercise: calculate ∫₀² x e^(x²) dx using the substitution u=x².

Level 3: choosing the tool

Decide whether a given integral benefits from a change of variable or whether it is simpler to solve directly without substitution.

Exercise: given ∫3x² dx and ∫x cos(x²) dx, explain why only one of the two clearly benefits from a change of variable.

Level 4: physical interpretation

Interpret the result of an integral solved through change of variable in a physical context, checking that the final units are correct.

Exercise: given the result of calculating the work of a spring through substitution u=kx, check that the final units correspond to energy.

Level 5: intentional error

Analyze a calculation where the integration limits were forgotten to be changed when applying a change of variable in a definite integral. Detect the error, correct it, and explain the physical consequence.

Exercise: invent a plausible error when calculating ∫₀² x e^(x²) dx using u=x² but leaving the limits as 0 and 2 instead of 0 and 4, show why it seems reasonable, correct it, and state the incorrect result it would have produced.