When the Inner Function Changes Direction
A change of variable in a definite integral can feel straightforward when the inner function moves in one direction across the interval. If it decreases, the transformed bounds simply run in the reverse order. But what if the inner function first decreases and then increases, or turns more than once? It is tempting to think that substitution requires the inner function to be monotone. It does not.
The key is that the definite substitution formula records the values of the inner function at the two endpoints, with the integral’s orientation preserving the signed contributions made along the way. A turning point does not invalidate the formula. It can, however, make it useful to split an integral into pieces so that the direction of change is clear on each piece.
The Definite Substitution Formula
Let \(g\) be continuously differentiable on \([a,b]\), and let \(f\) be continuous on an interval containing all the values \(g(x)\) for \(a\le x\le b\). Then the definite substitution formula is
The variable \(u\) is the variable of integration on the right. The lower and upper bounds are the values of \(g\) at the original endpoints, in that order. They are not chosen by finding a single inverse for \(g\). Such an inverse may not exist on the whole interval when \(g\) turns.
The formula allows \(g\) to increase on some parts of \([a,b]\) and decrease on others. The factor \(g'(x)\) carries direction into the integral: where \(g\) decreases, \(g'(x)\) is negative, so that part contributes with the corresponding sign.
Why Monotonicity Is Not Needed
Here is a proof under the stated conditions. Choose any fixed value \(u_0\) in the interval on which \(f\) is continuous, and define an antiderivative \(F\) of \(f\) by
By the Fundamental Theorem of Calculus, \(F'(u)=f(u)\). The chain rule then gives, for every \(x\in[a,b]\),
Thus \(F(g(x))\) is an antiderivative of the integrand on the left. Applying the Fundamental Theorem of Calculus to the original interval gives
Using the definition of \(F\), the difference on the right is
This proves the formula. Notice what the argument does not use: it does not require solving \(u=g(x)\), and it does not require \(g\) to move in only one direction. The chain rule applies along the entire interval, including at a turning point.
Reading a Turn as Signed Contributions
Splitting the original interval at a turning point makes the change of direction visible. On a decreasing piece, the transformed bounds go from a larger value to a smaller one. On an increasing piece, they go from a smaller value to a larger one. The resulting integrals are signed, so contributions from portions that retrace a range can cancel.
This is consistent with the endpoint formula: when the pieces are combined, the intermediate transformed bounds occur once as an upper bound and once as a lower bound. Their contributions join together, leaving the bounds determined by the original endpoints.
Determine where \(g\) changes direction on the original interval.
Write the original integral as a sum over intervals where the direction is clear.
For each piece, use the value of \(g\) at its left endpoint and then at its right endpoint.
Keep the order of each pair of bounds; do not replace a descending pair with an ascending one.
Worked Examples
Worked Example: A Quadratic That Decreases, Then Increases
Evaluate
Set \(g(x)=x^2\) and \(f(u)=u\). Then \(g'(x)=2x\), so the integrand has the form \(f(g(x))g'(x)\). The polynomial \(g\) decreases from \(1\) to \(0\) on \([-1,0]\), then increases from \(0\) to \(4\) on \([0,2]\). Its turning point is \(x=0\).
The direct substitution formula gives the endpoint bounds \(g(-1)=1\) and \(g(2)=4\):
To see how the turn is accounted for, split at \(x=0\). On the first piece, the bounds in \(u\) are \(1\) to \(0\); on the second, they are \(0\) to \(4\):
Check directly in the original variable: \(x^2(2x)=2x^3\), whose antiderivative is \(x^4/2\), since \(\frac{d}{dx}(x^4/2)=2x^3\). Therefore
The descending part contributes \(-1/2\), not \(+1/2\). Keeping that sign is what makes the split calculation agree with the endpoint formula.
Worked Example: A Complete Down-and-Back Turn
Evaluate
Take \(g(x)=(x-1)^2\) and \(f(u)=1\). Since \(g'(x)=2(x-1)\), the integrand is \(f(g(x))g'(x)\). The inner function starts at \(g(0)=1\), decreases to \(g(1)=0\), and then increases to \(g(2)=1\). The endpoint formula gives
Splitting at \(x=1\) shows why the result is zero: the first part traverses from \(1\) down to \(0\), and the second traverses from \(0\) back up to \(1\).
For a direct check, \(x^2-2x\) is an antiderivative because \(\frac{d}{dx}(x^2-2x)=2x-2=2(x-1)\). Thus
The two transformed pieces cancel because they traverse the same \(u\)-interval in opposite directions. The cancellation is part of the signed integral, not a failure of substitution.
Worked Example: A Turn with Different Endpoint Values
Evaluate
Let \(g(x)=x^2-2x+2=(x-1)^2+1\) and \(f(u)=u\). Then \(g'(x)=2x-2\), and the integrand is \(f(g(x))g'(x)\). The inner function decreases from \(2\) to \(1\) at \(x=1\), then increases to \(5\). Substitution using the original endpoints gives
Splitting at the turn gives the same result with the descending contribution shown explicitly:
Check in the original variable. An antiderivative is \(g(x)^2/2\), because the chain rule gives \(\frac{d}{dx}(g(x)^2/2)=g(x)g'(x)\), which is exactly the integrand. Since \(g(3)=5\) and \(g(0)=2\),
The middle value \(g(1)=1\) cancels when the two pieces are added. The final value depends on the original endpoint values, as the theorem predicts.
A Common Sign Mistake
In the first example, a sign error can occur while splitting at \(x=0\). The transformed bounds on the decreasing piece are \(1\) to \(0\), so its value is
A mistaken calculation might reverse these bounds without changing the sign:
That replacement changes the value of the integral. If the incorrect value is used, the two pieces appear to total \(\frac{1}{2}+8=\frac{17}{2}\), contradicting the correct result \(\frac{15}{2}\). The correction is to keep the bounds in the order dictated by \(g\): the first piece runs from \(1\) down to \(0\), so its integral is negative. Alternatively, reversing the bounds is valid only if the sign is also reversed:
Why This Matters
The definite substitution formula is more general than a procedure that solves for \(x\) in terms of \(u\). When an inner function turns, one value of \(u\) may come from more than one value of \(x\), so treating substitution as a search for a single inverse can lead to confusion. The chain-rule proof avoids that problem entirely.
For computation, the endpoint formula is often the quickest route: identify \(f(g(x))g'(x)\), evaluate \(g\) at the original endpoints, and use those transformed bounds. Splitting at a turning point is still valuable when you want to understand the direction of travel or check the signs. Both approaches describe the same signed integral.
The essential distinction is between a path that changes direction and a formula that requires monotonicity. The path may turn; the chain rule still applies throughout, and the Fundamental Theorem of Calculus still evaluates the result from endpoint values.
Check Your Understanding
Use the theorem and the role of signed contributions to answer these questions.
- State the differentiability and continuity conditions in the definite substitution formula.
- For \(g(x)=x^2\) on \([-2,1]\), identify the turning point and the transformed bounds on each piece.
- Why does the chain-rule proof not require \(g\) to be one-to-one?
- If \(g\) starts and ends at the same value and makes one down-and-back turn, what does the endpoint formula say about \(\int_a^b f(g(x))g'(x)\,dx\)?
- In a transformed piece with bounds \(3\) to \(1\), what sign error results from replacing those bounds by \(1\) to \(3\) without also changing the sign?