Why a Moving Endpoint Changes the Derivative
A definite integral can describe accumulated quantity. If the integrand \(f(t)\) is a rate and the upper endpoint is fixed, changing the input to an accumulation function changes the endpoint at which we measure that accumulation.
When the upper endpoint itself depends on the input \(x\), there are two linked changes: the integral responds to the value of the integrand at the endpoint, and the endpoint moves as \(x\) changes. The derivative must account for both.
The resulting rule combines the first part of the Fundamental Theorem of Calculus with the Chain Rule. Its key feature is a factor that is easy to overlook: the derivative of the moving endpoint.
Set Up the Variable-Upper-Limit Integral
Fix a number \(a\), and define an accumulation function with a fixed starting point by
Now let \(g\) be a differentiable function and consider
The variable of integration \(t\) is a placeholder: it indicates the input at which the integrand is evaluated throughout the interval of integration. The upper endpoint is \(g(x)\), so this expression is exactly \(H(g(x))\).
Continuity of \(f\) ensures that the first part of the Fundamental Theorem of Calculus applies to \(H\): \(H'(u)=f(u)\). Differentiability of \(g\) makes the Chain Rule applicable to \(H(g(x))\). These are the conditions that justify the formula; it is not enough simply to substitute the moving endpoint into the integrand.
Derivation from the Fundamental Theorem and Chain Rule
We can derive the rule by writing the variable-endpoint integral as a composition. By definition of \(H\),
Because \(f\) is continuous, the first part of the Fundamental Theorem of Calculus gives \(H'(u)=f(u)\). Since \(g\) is differentiable, the Chain Rule for a composition gives
This establishes the formula. The expression \(f(g(x))\) is the integrand evaluated at the current endpoint; \(g'(x)\) measures how quickly that endpoint changes. Both belong in the derivative.
Worked Examples
Worked Example: A Sine Upper Endpoint
Differentiate
Here \(f(t)=t^2+2t\), which is continuous for every real \(t\), and \(g(x)=\sin x\), which is differentiable for every real \(x\). The theorem therefore applies for every \(x\). Evaluate the integrand at the upper endpoint and multiply by the derivative of that endpoint:
To check, an antiderivative of \(t^2+2t\) is \(\frac{t^3}{3}+t^2\). Thus
Differentiating this expression gives
which agrees with the variable-limit formula.
Worked Example: An Exponential Upper Endpoint
Differentiate
The integrand \(f(t)=1/t\) is continuous for \(t>0\), and the endpoint \(g(x)=e^x\) is positive for every real \(x\). Thus the integrand is continuous on an interval containing the fixed endpoint \(1\) and the moving endpoint \(e^x\); the hypotheses hold. Applying the formula gives
For a check, evaluating the integral gives \(G(x)=\ln(e^x)-\ln(1)=x\). Differentiating this expression gives \(G'(x)=1\), as required.
Worked Example: A Decreasing Upper Endpoint
For \(-\frac{\pi}{2}<x<\frac{\pi}{2}\), differentiate
The integrand is continuous, and \(g(x)=\cos x\) is differentiable. The theorem gives
The negative factor comes from \(g'(x)=-\sin x\). To check, evaluate the integral using the antiderivative \(t^2+t\):
Its derivative is
which is the same result. The interval specified here ensures \(\cos x>0\); the formula itself requires continuity of the integrand along the relevant interval, not that the upper endpoint be increasing.
The Difference-Quotient View
The composition proof is concise, but the difference quotient makes the role of the endpoint rate especially visible. Fix \(x_0\), and write \(u_0=g(x_0)\). For a small nonzero \(h\), the change in the integral is
Set \(\Delta u=g(x_0+h)-u_0\). When \(\Delta u\ne 0\), divide the change in the integral by the change in \(x\) and factor the quotient:
As \(h\) approaches zero, differentiability of \(g\) implies \(\Delta u\) approaches zero and \(\Delta u/h\) approaches \(g'(x_0)\). Continuity of \(f\) at \(u_0\) implies that the average value in parentheses approaches \(f(u_0)\): over a sufficiently short interval near \(u_0\), the values of \(f(t)\) are as close as desired to \(f(u_0)\). Therefore the product approaches \(f(u_0)g'(x_0)\), which is \(f(g(x_0))g'(x_0)\).
If \(\Delta u=0\) for some values of \(h\), the integral change is zero for those values, and the displayed factorization is unavailable for that particular \(h\). The composition proof above already establishes the derivative under the stated hypotheses, including such cases. The difference-quotient explanation describes the limiting mechanism when the endpoint changes.
A Common Mistake: Forgetting the Endpoint Derivative
A frequent error is to substitute the endpoint into the integrand but omit the Chain Rule factor. For example, an incorrect calculation for the first example might be
This treats \(\sin x\) as if it were the variable endpoint itself changing at rate \(1\). But its rate of change is \(\cos x\). The corrected calculation is
A reliable check is to differentiate the endpoint separately before applying the formula. In general, for upper endpoint \(g(x)\), write down both \(f(g(x))\) and \(g'(x)\), then multiply them.
When the Rule Is Useful
The formula is useful whenever an accumulated quantity is measured up to a boundary that changes with the input. In an application, \(f(g(x))\) describes the rate at the current boundary, while \(g'(x)\) describes how quickly that boundary is moving. Their product is the instantaneous rate of change of the accumulated quantity with respect to \(x\).
It also distinguishes two different kinds of dependence. The integrand may vary across the integration variable \(t\), while the input \(x\) affects the integral through the upper endpoint. Keeping these roles separate helps prevent errors: first evaluate \(f\) at \(g(x)\), then multiply by the derivative of \(g\).
Check Your Understanding
For each question, identify the integrand and the moving endpoint before applying the rule.
- State the continuity and differentiability conditions used in the variable-upper-limit formula.
- Differentiate \(\int_0^{\cos x} (t+3)\,dt\).
- For \(P(x)=\int_2^{x^2+1} f(t)\,dt\), with \(f\) continuous, write \(P'(x)\) in terms of \(f\) and \(x\).
- In the formula, what does the factor \(g'(x)\) represent?
- Explain why \(\frac{d}{dx}\int_a^{g(x)}f(t)\,dt=f(g(x))\) is generally missing a necessary factor.