Why this matters
When you first meet integration by substitution, the computation feels like a deft magic trick. Consider this integral, for example.
$$\int (2x+1)^{5} \, dx$$Here \(\int\) is the long S-shaped integral sign, meaning "add up all the finely sliced pieces," and \(dx\) marks that the direction of that adding is \(x\). To solve it, we call the \(2x+1\) inside the parentheses a new letter \(u\), and at some point we swap the whole \(dx\) for \(du\). But somewhere in that process, a correction factor of \(\tfrac{1}{2}\) quietly appears. Where on earth did this \(\tfrac{1}{2}\) come from?
There is one more puzzle. The formula for integrating a power works fine for any exponent.
$$\int x^{n} \, dx = \frac{x^{n+1}}{n+1} + C$$Here \(n\) is the exponent (how many times the power is taken) and \(C\) is the arbitrary constant that always tags along with integration. Yet this reliable formula collapses at exactly one place, when the exponent is \(-1\). And out of nowhere, a logarithm fills that empty spot.
$$\int x^{-1} \, dx = \ln|x| + C$$Here \(\ln\) is the natural logarithm with base \(e\). Why does the formula break only at \(-1\), and why is it a logarithm that fills the hole?
Remarkably, these two puzzles share a single root. Substitution is not magic but the chain rule of differentiation run backward, and the logic of that reeling-back explains both how \(dx\) must be handled and why a hole opens only at exponent \(-1\).
Start with the chain rule — the trace differentiation leaves
First look the other way, at differentiation. When you differentiate a function-inside-a-function, say \((2x+1)^{6}\), the chain rule kicks in.
$$\frac{d}{dx}\,(2x+1)^{6} = 6\,(2x+1)^{5} \cdot 2$$Differentiating the outer function (the sixth power) first gives \(6(2x+1)^{5}\), and onto that gets multiplied the \(2\), which is the derivative of the inner function \(2x+1\). This final \(2\) is the heart of the chain rule. Since the inside changes \(2\) times as fast as \(x\), the outside's change is inflated by that same factor.
The point to remember is this. Differentiate a function-inside-a-function, and the result always carries the trace of "the derivative of the inner function" multiplied in. In the example, that trace was \(2\).
Integration reels this trace back in
Now integration is the job of undoing differentiation. So whenever you meet a shape in which the derivative of the inner function is already multiplied in, like the following, that is a sign the chain rule passed through.
$$\int 6\,(2x+1)^{5} \cdot 2 \, dx = (2x+1)^{6} + C$$Substitution is the technique of spotting this sign and reeling it back. Calling the inner function by a new name \(u\) tidies things up.
$$u = 2x+1 \quad\Rightarrow\quad \frac{du}{dx} = 2 \quad\Rightarrow\quad du = 2\,dx$$Here \(du\) is "a very small change in \(u\)" and \(dx\) is "a very small change in \(x\)." And the equation \(du = 2\,dx\) is exactly the same thing as that \(2\) the chain rule left behind. That is, the \(2\,dx\) inside the integral is no decoration — it was \(du\) itself all along. Swapping it in,
$$\int 6\,u^{5} \, du = u^{6} + C = (2x+1)^{6} + C$$it resolves cleanly. Substitution, in the end, is the work of "gathering back into \(du\) the inner derivative that the chain rule dropped as it passed."
dx is not decoration — the true identity of the factor one-half
Now back to the \(\tfrac{1}{2}\) puzzle from the start. Here is the original problem again.
$$\int (2x+1)^{5} \, dx$$This time there is no friendly \(2\) pre-multiplied. Setting \(u = 2x+1\) gives \(du = 2\,dx\), but the expression has only a single \(dx\), so we cannot swap it directly for \(du\). So we solve \(du = 2\,dx\) for \(dx\).
$$dx = \frac{du}{2}$$Substituting this \(dx\) in, the \(\tfrac{1}{2}\) follows naturally.
$$\int (2x+1)^{5} \, dx = \int u^{5} \cdot \frac{du}{2} = \frac{1}{2}\int u^{5} \, du = \frac{1}{2}\cdot\frac{u^{6}}{6} + C = \frac{(2x+1)^{6}}{12} + C$$To check it really holds, differentiate back. Differentiating \(\dfrac{(2x+1)^{6}}{12}\) gives \(\dfrac{6(2x+1)^{5}\cdot 2}{12} = (2x+1)^{5}\), returning the original expression exactly. The correction factor \(\tfrac{1}{2}\) was not forced in by hand; it comes from the fact that \(dx\) and \(du\) have different tick spacing.
The intuition is this. In \(u = 2x+1\), when \(x\) moves by \(1\), \(u\) moves by \(2\). So the ruler called \(u\) has tick spacing \(2\) times wider than the ruler called \(x\). Measuring the same stretch with the \(x\) ruler versus the \(u\) ruler gives a different "number of ticks," so when you trade one ruler for the other you must correct by that ratio. Since the \(x\) side is finer, switching over to \(u\) means multiplying by \(\tfrac{1}{2}\) to match the ticks. In the first screen of the interactive below you can lay these "two rulers with different spacing" side by side.
Why it works no matter what variable you choose
But why must \(2x+1\) be the thing we call \(u\)? Could we not set something else as \(u\)? In fact, we could. Substitution is merely giving a new name, and it does not change the correct answer of the computation.
The key is this. The relation \(du = g'(x)\,dx\) is automatically guaranteed by the chain rule no matter which function \(u = g(x)\) you pick. Whatever you set as \(u\), the moment you turn \(dx\) into \(du\), the matching correction factor is built to follow in exactly. So substitution "can't go wrong however you set it." It is only that a good choice makes the expression simpler, and a poor choice makes it messier. The usual knack is to set \(u\) to be "a chunk whose derivative already appears elsewhere in the expression" — so that its derivative gets absorbed cleanly into \(du\).
In other words, the reason substitution works no matter what variable you choose is that it is not an arbitrary trick but the sturdy rule of the chain rule turned straight around.
The power formula and its one and only hole
Now the second puzzle. Look again at the formula for integrating a power.
$$\int x^{n} \, dx = \frac{x^{n+1}}{n+1} + C$$The pattern is simple. Raise the exponent by one (\(n \to n+1\)) and divide by that raised new exponent. Why this is right shows up at once if you differentiate back. Differentiating \(\dfrac{x^{n+1}}{n+1}\), since differentiation pulls the exponent down to the front, gives \(\dfrac{(n+1)\,x^{n}}{n+1} = x^{n}\), returning the original. The \(n+1\) in the denominator is a device placed there in advance to cancel the \(n+1\) that differentiation will produce.
But that very device is the trap. Because the formula divides by \(n+1\), the moment \(n+1 = 0\), that is when \(n = -1\), it becomes division by zero and collapses. Whether the exponent is \(2\) or \(100\) or \(-3\) or \(\tfrac{1}{2}\), all are fine, yet at \(-1\) alone the denominator vanishes and the formula is undefined.
This collapse feels dramatic if you push the exponent toward \(-1\) with a slider. As the denominator \(n+1\) approaches \(0\), the leading coefficient \(\dfrac{1}{n+1}\) explodes. For example, at exponent \(-0.5\) the coefficient is \(\dfrac{1}{0.5}=2\), at \(-0.9\) it is \(\dfrac{1}{0.1}=10\), and at \(-0.99\) it grows uncontrollably to \(100\). At exactly \(-1\) it is simply undefined.
The logarithm fills the empty spot
What is the answer at that spot the formula cannot handle, \(\displaystyle\int x^{-1}\,dx = \int \frac{1}{x}\,dx\)? Flip the question and it becomes simple. "Which function has \(\dfrac{1}{x}\) as its derivative?"
The answer is the natural logarithm. As we saw in the derivatives of exponentials and logarithms, the derivative of \(\ln x\) is exactly \(\dfrac{1}{x}\).
$$\frac{d}{dx}\,\ln x = \frac{1}{x} \quad\Rightarrow\quad \int \frac{1}{x} \, dx = \ln|x| + C$$The power formula builds its answer by "raising the exponent by one and dividing by the new exponent," but at \(n=-1\) the raised new exponent is \(0\), so that very method stops working. What stands ready to fill that special spot is precisely the logarithm. The absolute-value bars \(|x|\) appear because we must be able to measure the area under \(\dfrac{1}{x}\) even when \(x\) is negative — \(\ln\) only accepts positive inputs, so we feed it \(|x|\) with the sign stripped off, letting the answer extend to the negative side too.
To sum up: the power formula for integration springs a hole at exactly one place, when the exponent is \(-1\), because the denominator becomes zero, and that hole is filled precisely by the logarithm, the one function whose derivative is \(\dfrac{1}{x}\). In the second interactive you can watch the curve switch over to a logarithm the moment you push the exponent into \(-1\).
In one picture: two rulers, and the hole in the exponent
The interactive below has two screens.
- Substitution ruler: change the scale \(a\) in \(u = a\,x + 1\) with a slider, and it lays two rulers side by side to show how differently the \(x\) ticks and the \(u\) ticks spread. At \(a=2\), when \(x\) moves \(1\), \(u\) moves \(2\), so you see with your eyes that the correction factor is \(\tfrac{1}{2}\).
- Hole in the exponent: move the exponent \(n\) with a slider and the resulting integral curve \(\dfrac{x^{n+1}}{n+1}\) is drawn along. The moment you push \(n\) into \(-1\), instead of the exploding coefficient, the curve switches over to \(\ln|x|\).
The two screens say one thing. \(dx\) is not decoration you can swap freely but a ruler with tick marks, and the hole in the power formula is no accident but the single point where the denominator becomes zero. Both flow from one principle: integration is differentiation reeled backward.
The key summary
| Question | Answer |
|---|---|
| What is substitution, in the end? | The chain rule of differentiation run backward |
| Why does a factor appear when \(dx\) becomes \(du\)? | \(du = g'(x)\,dx\) — the two variables have different tick spacing |
| Why does it work with any variable? | The chain rule matches the correction factor automatically (a good choice just makes it simpler) |
| Why does the power formula break at \(n=-1\)? | The denominator \(n+1\) becomes \(0\), giving division by zero |
| Why does a logarithm fill the hole? | Because the derivative of (\ln |
Threaded into one line — substitution is reeling the chain rule backward, so you must convert \(dx\) into \(du\) with the ticks matched, and the power formula springs a hole only at exponent \(-1\), where the denominator is zero, a spot the logarithm fills.
When you study this with AI
If you miss "why you set it up that way," substitution feels like memorizing a fresh trick for every problem. When asking an AI, framing the question around the reverse direction of the chain rule threads the scattered tricks into one.
Useful example questions:
- "When solving \(\int (2x+1)^{5}\,dx\) by substitution, explain why the \(\tfrac{1}{2}\) appears, connecting it to \(du = 2\,dx\)."
- "Explain why the power formula for integration fails only when the exponent is \(-1\), on the basis of the denominator \(n+1\)."
- "In \(\int \frac{1}{x}\,dx = \ln|x| + C\), show with an example why the absolute value is needed."
Closing
The moment substitution turns \(dx\) into \(du\), and the moment the power formula switches to a logarithm at exponent \(-1\), look at first like two unrelated, separate rules. But both flow naturally from a single sentence: integration is differentiation reeled backward. \(dx\) was a ruler with tick marks, and the hole was just the one point where the denominator becomes zero.
The feel of trading two rulers with different spacing, and the scene of a logarithm filling the single spot where the denominator vanishes — grasp these two pictures, and the appearance of substitution and the logarithm is no longer a rule to memorize but a consequence that must follow once you turn the chain rule around.
Related reading — good to read first: Why the chain rule is "multiplication" · Why integration is the reverse of differentiation → next: Why integrals carry a + C · What are the du and dv in integration by parts · Differentiating exponentials and logarithms · draw it yourself: Desmos · Wolfram Alpha