Tutorials › Calculus I › Integrals With Two Moving Limits

The Fundamental Theorem of Calculus · Tutorial 1094 of 1495

Integrals With Two Moving Limits

Use F'(x) = f(b(x))b'(x) - f(a(x))a'(x) to differentiate an integral with two moving limits, and check the result numerically.

Intermediate 11 min read

What You'll Learn

  • Split an integral with two moving limits into upper-end and lower-end contributions.
  • State and derive the two-limit form of the Fundamental Theorem.
  • Apply the formula when the limits are polynomials, linear functions and trigonometric functions.
  • Check an answer by comparing with direct integration or a numerical derivative.
  • Avoid dropped lower terms, sign errors and missing chain-rule factors.

Two Moving Endpoints

In earlier tutorials, we differentiated functions of the form \(\int_c^{u(x)}f(t)\,dt\), where only the upper limit moved. Many problems involve integrals where both limits depend on \(x\), such as \(\int_{x}^{x^2}(t^2+1)\,dt\) or \(\int_{2x}^{3x+1}e^{-t^2}\,dt\). The derivative of such an integral has two contributions: one from the upper end, which adds area as the upper limit moves, and one from the lower end, which removes area as the lower limit moves. The Fundamental Theorem of Calculus, together with the Chain Rule, gives both contributions at once.

Two-Limit Formula: If \(f\) is continuous and \(a(x)\), \(b(x)\) are differentiable, then \(F(x)=\displaystyle\int_{a(x)}^{b(x)}f(t)\,dt\) has derivative \(F'(x)=f\bigl(b(x)\bigr)\,b'(x)-f\bigl(a(x)\bigr)\,a'(x)\).

Deriving the Formula

Fix any constant \(c\) in the domain of \(f\), and let \(G(u)=\int_c^u f(t)\,dt\). By the Fundamental Theorem, \(G'(u)=f(u)\). Splitting the integral at \(c\) gives

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

Now differentiate each term with the Chain Rule: \(\dfrac{d}{dx}G(b(x))=G'(b(x))\,b'(x)=f(b(x))\,b'(x)\), and similarly for \(a\). Subtracting gives the formula. The constant \(c\) has disappeared, which is why the answer does not depend on it. The proof also explains the signs: the lower-limit term is subtracted because the lower limit appears with a minus sign after splitting.

Worked Example: A Polynomial Integrand

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

Here \(f(t)=t^2+1\), \(b(x)=x^2\) with \(b'=2x\), and \(a(x)=x\) with \(a'=1\). The upper contribution is \(f(x^2)\cdot2x=(x^4+1)(2x)=2x^5+2x\). The lower contribution is \(f(x)\cdot1=x^2+1\). Therefore

$$ F'(x)=2x^5+2x-x^2-1. $$

Check by direct integration: \(F(x)=\left(\tfrac{x^6}{3}+x^2\right)-\left(\tfrac{x^3}{3}+x\right)\), whose derivative is \(2x^5+2x-x^2-1\). At \(x=2\), the formula gives \(64+4-4-1=63\), and a numerical derivative of the integral gives 63.0.

Worked Example: A Gaussian Integrand with Linear Limits

Differentiate \(F(x)=\displaystyle\int_{2x}^{3x+1}e^{-t^2}\,dt\). This integrand has no elementary antiderivative, so the formula is the only practical method.

Here \(b=3x+1\) with \(b'=3\), and \(a=2x\) with \(a'=2\). Then

$$ F'(x)=3e^{-(3x+1)^2}-2e^{-4x^2}. $$

Check at \(x=0\): \(F'(0)=3e^{-1}-2=-0.896362\). A numerical derivative of the integral at \(0\) gives the same value.

Worked Example: Trigonometric Limits

Differentiate \(F(x)=\displaystyle\int_{\sin x}^{\cos x}\sqrt{1+t^2}\,dt\).

The upper limit is \(\cos x\) with derivative \(-\sin x\), and the lower limit is \(\sin x\) with derivative \(\cos x\). Then

$$ F'(x)=\sqrt{1+\cos^2x}\,(-\sin x)-\sqrt{1+\sin^2x}\,(\cos x). $$

Check at \(x=0.5\): the formula gives -1.61109, and a numerical derivative of the integral agrees. Both terms are negative here because \(\sin 0.5\) and \(\cos 0.5\) are positive.

Summary of the Procedure

StepWhat to doExample: ∫ from x to x² of (t²+1) dt
1Identify f, upper limit b(x), lower limit a(x)f(t) = t² + 1, b = x², a = x
2Compute b'(x) and a'(x)b' = 2x, a' = 1
3Evaluate f at each limitf(x²) = x⁴ + 1, f(x) = x² + 1
4Form f(b)b' − f(a)a'(x⁴+1)(2x) − (x²+1)
5Simplify and check2x⁵ + 2x − x² − 1

Common Mistakes

Dropping the lower term. Writing \(F'(x)=f(b(x))\,b'(x)\) alone is the single-limit formula and is wrong when the lower limit also moves. In the first example this would give \(2x^5+2x\), missing \(-x^2-1\). At \(x=2\), that mistake gives \(68\) instead of \(63\).

Sign errors. The lower contribution is always subtracted. If the lower limit were \(x^2\) and the upper limit \(x\), the answer would change sign: \(F'(x)=f(x)-f(x^2)\cdot2x\).

Missing chain factors. Evaluating \(f(b(x))\) is not enough; the derivative \(b'(x)\) must multiply it. In the Gaussian example, forgetting the factors \(3\) and \(2\) would change the result at \(x=0\) from \(3e^{-1}-2\) to \(e^{-1}-1\), a different number.

Why Each End Contributes What It Does

Think of \(F(x)\) as the signed area under \(f\) between the two moving limits. When \(x\) increases by a small amount \(\Delta x\), the upper limit moves by about \(b'(x)\,\Delta x\), and a thin strip of height \(f(b(x))\) is added at the right end. The area added is about \(f(b(x))\,b'(x)\,\Delta x\). At the left end, the lower limit moves by about \(a'(x)\,\Delta x\), and a strip of height \(f(a(x))\) is removed if the limit moves to the right, so the change from the left end is about \(-f(a(x))\,a'(x)\,\Delta x\). Dividing the total change by \(\Delta x\) and letting \(\Delta x\to0\) recovers the formula. This picture also tells you what to expect: if the upper limit moves faster than the lower limit and \(f\) is positive, the area grows, so \(F'\) is positive.

Worked Example: Comparing the Formula with Direct Integration

Let \(F(x)=\displaystyle\int_{x}^{x^3}e^{t}\,dt\). Differentiate it by the formula and by evaluating the integral first.

By the formula: \(F'(x)=e^{x^3}\cdot3x^2-e^{x}\cdot1=3x^2e^{x^3}-e^x\).

By direct integration: \(F(x)=e^{x^3}-e^{x}\), so \(F'(x)=3x^2e^{x^3}-e^x\). The two answers are identical.

Direct integration is available here because \(e^t\) has an elementary antiderivative. The value of the formula is that it works even when no antiderivative exists, as with \(e^{-t^2}\).

Worked Example: Finding Where the Integral Is Largest

Let \(F(x)=\displaystyle\int_{x}^{2x}\dfrac{dt}{1+t^2}\) for \(x>0\). Find where \(F\) has its maximum.

The derivative is \(F'(x)=\dfrac{2}{1+4x^2}-\dfrac{1}{1+x^2}\). Setting it to zero, \(2(1+x^2)=1+4x^2\), so \(1=2x^2\) and \(x=\dfrac1{\sqrt2}\approx0.7071\).

For \(x\) less than this value, \(F'>0\); for larger \(x\), \(F'<0\). Hence the maximum is at \(x=1/\sqrt2\), where the value is \(F=\arctan(\sqrt2)-\arctan(1/\sqrt2)\approx0.339837\).

When the Lower Limit Is a Constant

If the lower limit is a constant \(c\), then \(a'(x)=0\) and the second term vanishes. The formula reduces to \(F'(x)=f(b(x))\,b'(x)\), the single-moving-limit version from earlier tutorials. This means the two-limit formula is not a new rule but a more general form of the one you already know. It also gives a quick way to see consistency: a problem with two moving limits can always be rewritten as a difference of two one-limit problems.

The same idea lets you handle limits that are themselves given as integrals, or integrals that run over an interval whose endpoints are functions like \(\sqrt x\) or \(\ln x\). For each such problem, the procedure is the same: write down \(b\), \(b'\), \(a\), \(a'\), evaluate the integrand at both limits, and assemble \(f(b)b'-f(a)a'\).

A useful habit is to estimate the sign of \(F'\) before computing it. In the Gaussian example, the integrand \(e^{-t^2}\) is largest near \(t=0\). Moving the interval \([2x,3x+1]\) changes how much of that peak it contains, and the formula \(3e^{-(3x+1)^2}-2e^{-4x^2}\) captures this: at \(x=0\) the interval is \([0,1]\), which starts at the peak, and the derivative is negative because the lower end is at the highest point of the integrand and moves to the right, removing a thick strip, while the upper end adds only a thin one.

Where This Fits in the Course

This tutorial belongs to the module “The Fundamental Theorem of Calculus”. The tutorial just before it is “Nonlinear Upper Limits,” and the one that follows is “Orientation and Signs in Variable-Limit Formulas.”

Practice Problems with Answers

Try each problem before reading the answer. Each answer below was verified by differentiation or by evaluating a difference quotient or integral numerically.

  1. Differentiate \(\int_{x}^{2x}(t^3+t)\,dt\).
    Answer. \(f(2x)\cdot2-f(x)=(8x^3+2x)\cdot2-(x^3+x)=15x^3+3x\).
  2. Differentiate \(\int_{x^2}^{x^3}\cos t\,dt\).
    Answer. \(3x^2\cos(x^3)-2x\cos(x^2)\).
  3. Differentiate \(\int_{1/x}^{x}\dfrac{dt}{t}\) for \(x>0\).
    Answer. \(\dfrac1x-\dfrac{1}{1/x}\cdot\left(-\dfrac1{x^2}\right)=\dfrac1x+\dfrac1x=\dfrac2x\).
  4. Find \(F'(1)\) for \(F(x)=\int_{x}^{x^2+1}\sqrt{t}\,dt\).
    Answer. \(\sqrt{2}\cdot2-\sqrt1\cdot1=2\sqrt2-1\approx1.8284\).

Check Your Understanding

Work these without looking back.

  1. State the two-limit formula and explain why the lower term is subtracted.
  2. Differentiate \(\int_{x}^{x^3}e^{t}\,dt\) and check by integrating first.
  3. Differentiate \(\int_{\ln x}^{x}\sin t\,dt\) for \(x>0\).
  4. What changes in the formula if the lower limit is a constant?
  5. Explain why the answer does not depend on the constant \(c\) used in the derivation.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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