Tutorials › AP Calculus › Integrals with Two Variable Bounds

Fundamental Theorem and Accumulation · Tutorial 461 of 999

Integrals with Two Variable Bounds

Combine the contributions from both moving endpoints to find the derivative of an integral with two variable bounds.

Intermediate 9 min read

What You'll Learn

  • State the conditions for differentiating an integral with two variable bounds
  • Apply the upper-bound and lower-bound terms with their correct signs
  • Use the chain rule to account for how each bound changes
  • Derive the formula using the Fundamental Theorem of Calculus
  • Check results by differentiating an antiderivative
  • Identify and correct a common sign error

When Both Endpoints Move

A definite integral can represent signed accumulation over an interval. If the interval changes as \(x\) changes, then the accumulated value can change because its upper endpoint moves, its lower endpoint moves, or both happen at once.

For an integral with a variable upper endpoint, the Fundamental Theorem of Calculus gives the integrand evaluated at that endpoint, with an additional chain-rule factor if the endpoint itself changes with \(x\). A moving lower endpoint contributes too, but with the opposite sign. When both endpoints vary, the derivative combines these effects.

Key idea: The upper endpoint contributes positively and the lower endpoint contributes negatively. Each contribution is multiplied by the rate at which that endpoint moves.

The Two-Bound Rule

Let \(f\) be continuous on an interval containing the endpoint values near the \(x\) under consideration. Let \(a\) and \(b\) be differentiable functions, and define

$$ F(x)=\int_{a(x)}^{b(x)} f(t)\,dt. $$

The variable \(t\) is a dummy variable of integration: it indicates the input to \(f\) and is not the variable with respect to which we differentiate. Under these conditions, the derivative is

Theorem: If \(f\) is continuous and \(a\) and \(b\) are differentiable, then
$$ F'(x)=f\bigl(b(x)\bigr)b'(x)-f\bigl(a(x)\bigr)a'(x). $$
The first term comes from the upper bound; the second comes from the lower bound.

There are two distinct ingredients in each term. First, evaluate the integrand at the endpoint. Then multiply by the derivative of that endpoint. The minus sign before the lower-bound term is not optional: it records the fact that moving the lower endpoint forward removes part of the interval of accumulation.

If the upper bound is fixed, its derivative is zero, so it contributes nothing. If the lower bound is fixed, its derivative is zero as well. When both are fixed, the integral is constant with respect to \(x\), and its derivative is zero.

Why the Formula Works

The proof uses the Fundamental Theorem of Calculus for a fixed base point, followed by the chain rule. Choose a constant \(c\) in an interval on which \(f\) is continuous, and define an accumulation function

$$ A(y)=\int_c^y f(t)\,dt. $$

By the Fundamental Theorem of Calculus, \(A\) is differentiable and \(A'(y)=f(y)\). Additivity of definite integrals gives an expression for the integral between the two moving endpoints:

$$ \int_{a(x)}^{b(x)}f(t)\,dt = \int_c^{b(x)}f(t)\,dt-\int_c^{a(x)}f(t)\,dt = A\bigl(b(x)\bigr)-A\bigl(a(x)\bigr). $$

Differentiate both terms using the chain rule. The derivative of the first is \(A'(b(x))b'(x)\), and the derivative of the second is \(A'(a(x))a'(x)\). The second term is subtracted, so its contribution remains negative. Substituting \(A'(y)=f(y)\) proves the rule:

$$ \begin{aligned} F'(x) &=A'\bigl(b(x)\bigr)b'(x)-A'\bigl(a(x)\bigr)a'(x)\\ &=f\bigl(b(x)\bigr)b'(x)-f\bigl(a(x)\bigr)a'(x). \end{aligned} $$

This argument also explains why the integrand is evaluated at each endpoint separately. Each endpoint is substituted into \(f\), and each endpoint's motion is accounted for by its own chain-rule factor.

A Sign Check Before Calculating

Before using the formula, identify the upper and lower bounds and write down their derivatives. A reliable order is: upper-bound value times upper-bound rate, minus lower-bound value times lower-bound rate. The endpoint values are not subtracted in an arbitrary order; the order is determined by which endpoint is upper and which is lower.

1
Identify the integrand.
Keep its input variable distinct from the variable of differentiation.
2
Label both bounds.
Write the upper bound as \(b(x)\) and the lower bound as \(a(x)\).
3
Evaluate and multiply.
Use \(f(b(x))b'(x)\) for the upper bound and \(f(a(x))a'(x)\) for the lower bound.
4
Subtract the lower contribution.
Form \(f(b(x))b'(x)-f(a(x))a'(x)\), then simplify.

Worked Examples

Worked Example: A Sliding Interval of Fixed Width

Differentiate

$$ F(x)=\int_x^{x+2}(t^2+1)\,dt. $$

Here \(f(t)=t^2+1\), the lower bound is \(a(x)=x\), and the upper bound is \(b(x)=x+2\). Their derivatives are \(a'(x)=1\) and \(b'(x)=1\). Apply the two-bound rule:

$$ \begin{aligned} F'(x) &=f(x+2)(1)-f(x)(1)\\ &=\bigl((x+2)^2+1\bigr)-(x^2+1)\\ &=(x^2+4x+4+1)-(x^2+1)\\ &=4x+4. \end{aligned} $$

Check by evaluating the integral with an antiderivative. An antiderivative of \(t^2+1\) is \(\frac{t^3}{3}+t\), so

$$ \begin{aligned} F(x) &=\left[\frac{t^3}{3}+t\right]_{x}^{x+2}\\ &=\frac{(x+2)^3-x^3}{3}+2\\ &=\frac{6x^2+12x+8}{3}+2\\ &=2x^2+4x+\frac{14}{3}. \end{aligned} $$

Therefore \(F'(x)=4x+4\), matching the result from the two-bound rule.

Worked Example: Bounds Moving at Different Rates

Differentiate

$$ G(x)=\int_{2x}^{3x}(t+1)\,dt. $$

Here \(f(t)=t+1\), \(a(x)=2x\), and \(b(x)=3x\). The rates are \(a'(x)=2\) and \(b'(x)=3\). Substituting each bound into the integrand gives

$$ \begin{aligned} G'(x) &=f(3x)(3)-f(2x)(2)\\ &=(3x+1)(3)-(2x+1)(2)\\ &=9x+3-4x-2\\ &=5x+1. \end{aligned} $$

Check by direct integration. An antiderivative of \(t+1\) is \(\frac{t^2}{2}+t\), so

$$ \begin{aligned} G(x) &=\left[\frac{t^2}{2}+t\right]_{2x}^{3x}\\ &=\left(\frac{9x^2}{2}+3x\right)-\left(2x^2+2x\right)\\ &=\frac{5x^2}{2}+x. \end{aligned} $$

Differentiating this expression gives \(G'(x)=5x+1\), as required. Notice that each endpoint's rate matters: the upper endpoint moves three times as fast as \(x\), while the lower endpoint moves twice as fast.

Worked Example: A Lower Bound That Moves Faster

Differentiate

$$ H(x)=\int_{2x}^{x}(t^2+1)\,dt. $$

The upper bound is \(b(x)=x\), and the lower bound is \(a(x)=2x\). Thus \(b'(x)=1\) and \(a'(x)=2\). Apply the rule in upper-minus-lower order:

$$ \begin{aligned} H'(x) &=f(x)(1)-f(2x)(2)\\ &=(x^2+1)-2\bigl((2x)^2+1\bigr)\\ &=x^2+1-2(4x^2+1)\\ &=x^2+1-8x^2-2\\ &=-7x^2-1. \end{aligned} $$

Check by evaluating the integral. An antiderivative of \(t^2+1\) is \(\frac{t^3}{3}+t\), and therefore

$$ \begin{aligned} H(x) &=\left[\frac{t^3}{3}+t\right]_{2x}^{x}\\ &=\left(\frac{x^3}{3}+x\right)-\left(\frac{8x^3}{3}+2x\right)\\ &=-\frac{7x^3}{3}-x. \end{aligned} $$

Its derivative is \(-7x^2-1\), which confirms the result. The bounds happen to be in descending order when \(x>0\), but the rule still applies: the integral is signed, and the stated upper and lower bounds retain their roles.

Common Mistake: Giving the Lower Bound a Positive Sign

A frequent error is to add both endpoint contributions. For example, for \(H(x)=\int_{2x}^{x}(t^2+1)\,dt\), an incorrect calculation would be

$$ \begin{aligned} H'(x) &\ne f(x)(1)+f(2x)(2)\\ &=(x^2+1)+2(4x^2+1)\\ &=9x^2+3. \end{aligned} $$

The error is the plus sign before the lower-bound contribution. Moving the lower limit changes the integral with the opposite sign from moving the upper limit. The correct calculation is

$$ \begin{aligned} H'(x) &=f(x)(1)-f(2x)(2)\\ &=(x^2+1)-2(4x^2+1)\\ &=-7x^2-1. \end{aligned} $$

The antiderivative check above confirms this corrected derivative. A useful safeguard is to write the complete formula with the minus sign before substituting any values, rather than trying to decide the signs after expanding.

Why the Rule Matters

When both endpoints move, the integral measures accumulation over a changing interval. Its derivative records the net effect of what enters or leaves through the endpoints. The upper endpoint adds a contribution according to the integrand's value there and its direction and rate of motion. The lower endpoint changes the integral in the opposite way.

This interpretation is consistent with signed integrals, including integrals whose bounds are written in descending order. The formula depends on the stated upper and lower limits, not on whether their numerical values happen to be ordered in the usual way for a particular \(x\). Keep the roles of the bounds clear, include both chain-rule factors, and check signs before simplifying.

Check Your Understanding

For each question, identify the endpoint contributions before simplifying.

  1. Differentiate \(\displaystyle \int_{x}^{x+1}(t^2+2)\,dt\) using the two-bound rule.
  2. For \(\displaystyle K(x)=\int_{3x}^{x}(t+4)\,dt\), which endpoint contribution has a negative sign?
  3. Differentiate \(\displaystyle \int_{2x}^{4x}(t^2+1)\,dt\), showing both endpoint rates.
  4. State the continuity and differentiability conditions needed for the two-bound rule.
  5. Explain why a lower bound contributes with a minus sign, using the accumulation-function proof.

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon