Tutorials › Calculus I › Mixed Problems With Two Moving Endpoints

The Fundamental Theorem of Calculus · Tutorial 1116 of 1495

Mixed Problems With Two Moving Endpoints

Practice the two-limit derivative formula on full problems that ask for tangent lines, critical points and simplified closed forms.

Intermediate 12 min read

What You'll Learn

  • Differentiate integrals with two variable endpoints in complete examples.
  • Find tangent lines to functions defined by integrals.
  • Locate critical points and classify them using the sign of the derivative.
  • Check an answer by evaluating the integral in closed form when possible.
  • Recognize when a two-endpoint integral simplifies before differentiation.

Putting the Two-Limit Formula to Work

The formula \(\dfrac{d}{dx}\displaystyle\int_{a(x)}^{b(x)}f(t)\,dt=f(b(x))\,b'(x)-f(a(x))\,a'(x)\) is easy to state and easy to misapply under pressure. This tutorial works through complete problems that are typical of exams: a tangent line, a closed-form simplification, and an optimization. In each, we compute the derivative with the formula and then confirm it by another route, because a result that has been checked twice can be trusted.

Working Checklist: (1) Name \(f\), \(a(x)\), \(b(x)\) and their derivatives. (2) Write \(f(b)b'-f(a)a'\) with every substitution made. (3) Simplify. (4) Check at one value of \(x\), either by direct integration or by a numerical derivative.

Worked Example 1: A Tangent Line

Let \(y=\displaystyle\int_x^{x^2}(2t+1)\,dt\). Find the equation of the tangent line at \(x=1\).

The point. At \(x=1\) both limits equal \(1\), so the integral is over an interval of length zero and \(y(1)=0\).

The slope. With \(f(t)=2t+1\), \(b=x^2\), \(a=x\):

$$ y'(x)=(2x^2+1)(2x)-(2x+1)(1)=4x^3+2x-2x-1=4x^3-1. $$

At \(x=1\), \(y'(1)=3\). The tangent line is \(y=3(x-1)\).

Check by direct integration: the antiderivative of \(2t+1\) is \(t^2+t\), so \(y=(x^4+x^2)-(x^2+x)=x^4-x\). Then \(y(1)=0\) and \(y'=4x^3-1\), which equals \(3\) at \(x=1\). The two methods agree.

Worked Example 2: A Hidden Simplification

Let \(G(x)=\displaystyle\int_{1/x}^{x}\dfrac{dt}{t}\) for \(x>0\). Find \(G'(x)\) and simplify \(G\).

Here \(b=x\) with \(b'=1\), and \(a=1/x\) with \(a'=-1/x^2\). Then

$$ G'(x)=\frac1x\cdot1-\frac{1}{1/x}\cdot\left(-\frac1{x^2}\right)=\frac1x+x\cdot\frac1{x^2}=\frac2x. $$

Direct integration gives \(G(x)=\ln x-\ln(1/x)=\ln x+\ln x=2\ln x\), whose derivative is \(2/x\). The formula and the closed form match. Notice that the second term in the formula is added in effect, because the lower limit moves left when \(x\) increases and so contributes area.

Numerical check at \(x=2\): \(G'(2)=1\), and a numerical derivative of the integral gives 1.0.

Worked Example 3: Locating a Maximum

Let \(K(x)=\displaystyle\int_x^{x+1}e^{-t^2}\,dt\), the area under the bell curve over a window of width one. Where is the window placed to capture the most area?

Here \(b=x+1\), \(a=x\), and both have derivative \(1\). So

$$ K'(x)=e^{-(x+1)^2}-e^{-x^2}. $$

Setting \(K'=0\) requires \((x+1)^2=x^2\), which gives \(2x+1=0\), so \(x=-\tfrac12\). For \(x<-\tfrac12\), \((x+1)^2<x^2\), so the first exponent is less negative and \(K'>0\). For \(x>-\tfrac12\), \(K'<0\). Thus \(K\) has a maximum at \(x=-\tfrac12\), where the window \([-\tfrac12,\tfrac12]\) is centered at the peak.

Value and check: \(K(-\tfrac12)=\displaystyle\int_{-1/2}^{1/2}e^{-t^2}dt\approx0.922562\). At \(x=0.3\), the formula gives \(K'(0.3)=e^{-1.69}-e^{-0.09}=-0.729412\), matching a numerical derivative. The negative sign is correct because \(0.3>-\tfrac12\).

Summary of Problem Types

Problem typeWhat to computeExample result
Tangent liney(x₀) and y'(x₀) from the formulay = 3(x − 1)
Simplify firstCombine logarithm or algebra before differentiatingG = 2 ln x, G' = 2/x
Maximum or minimumSolve f(b)b' = f(a)a'x = −1/2 for the window
VerifyIntegrate in closed form or differentiate numericallyBoth agree at each test point

Common Mistakes

Forgetting a chain factor on a limit like \(1/x\). In Example 2, using \(a'=1\) instead of \(a'=-1/x^2\) would give the wrong sign for the second term and produce \(0\) instead of \(2/x\).

Setting \(F'=0\) incorrectly. In Example 3, writing \(e^{-(x+1)^2}=0\) is not valid; the equation is \(e^{-(x+1)^2}=e^{-x^2}\), which is solved by comparing exponents.

Skipping the point on the curve. A tangent line requires both the value and the slope. In Example 1, the value is zero because the limits coincide at \(x=1\), a fact that is easy to overlook.

Differentiate First or Integrate First?

When the integrand has an elementary antiderivative, there are two valid routes: integrate and then differentiate, or apply the formula directly. Both give the same answer, and each is a check on the other. The formula route is shorter when the antiderivative is messy, and it is the only route when no elementary antiderivative exists, as with \(e^{-t^2}\) or \(\sin(t^2)\). The integrate-first route is shorter when the integrand is a simple polynomial, because the result is a polynomial that can be differentiated term by term and also analyzed for concavity and extrema.

Worked Example 4: Second Derivative and Concavity

Return to \(y=\displaystyle\int_x^{x^2}(2t+1)\,dt=x^4-x\). Find where the graph is concave up.

We have \(y'=4x^3-1\), so \(y''=12x^2\). This is nonnegative for all \(x\) and zero only at \(x=0\), so the graph is concave up everywhere except for a single point of zero curvature at the origin. The critical point is where \(4x^3=1\), that is \(x=4^{-1/3}\approx0.62996\), and since \(y''>0\) there, it is a minimum.

The same conclusion can be reached without integrating: the formula gives \(y'=4x^3-1\) directly, and differentiating that again is routine. The integral form shows why the derivative of the lower limit contributed the constant \(-1\).

Worked Example 5: A Logarithmic Integrand

Let \(A(x)=\displaystyle\int_x^{3x}\ln(1+t^2)\,dt\). Find \(A'(1)\).

The upper limit is \(3x\) with derivative \(3\), and the lower limit is \(x\) with derivative \(1\). So \(A'(x)=3\ln(1+9x^2)-\ln(1+x^2)\), and at \(x=1\),

$$ A'(1)=3\ln 10-\ln 2. $$

Numerically, \(3\ln10-\ln2=6.21461\), and a numerical derivative of the integral at \(x=1\) gives 6.21461. The integrand has no convenient antiderivative to check against, so the numerical derivative is the independent check.

Reading the Result

After computing a derivative of this kind, ask whether its sign makes sense. In Example 5, the integrand \(\ln(1+t^2)\) increases for \(t>0\), and both limits move to the right as \(x\) grows, so the interval slides toward larger values and also lengthens. The area should increase quickly, and indeed \(A'(1)\approx6.215\) is positive and large. In Example 3, the window moves right across the peak of the bell curve, so the area first increases and then decreases, matching the sign change of \(K'\). Such sanity checks catch the most common errors, which are sign mistakes and missing chain factors.

One more caution concerns domains. All of the formulas above assume that \(f\) is continuous on an interval containing every value taken by both limits. In Example 2, the integrand \(1/t\) is continuous on \((0,\infty)\), and both \(x\) and \(1/x\) stay positive when \(x>0\), so the computation is legitimate. If the limits ever crossed zero, the integral would be undefined. Checking the domain takes seconds and prevents meaningless answers.

It also helps to remember that the formula is linear in the integrand: if \(f=f_1+f_2\), the derivative splits into the corresponding sum. Combined with the checklist, this lets you break a complicated integrand into pieces and differentiate each one separately, then add the results.

Where This Fits in the Course

This tutorial belongs to the module “The Fundamental Theorem of Calculus”. The tutorial just before it is “Variable-Limit Derivatives With Trigonometric Integrands,” and the one that follows is “The Missing Chain Factor Error.”

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}^{x^2}\dfrac{dt}{1+t^2}\).
    Answer. \(\dfrac{2x}{1+x^4}-\dfrac1{1+x^2}\).
  2. Find the tangent line to \(y=\int_{x}^{2x}(3t^2)\,dt\) at \(x=1\).
    Answer. \(y=7x^3\), so \(y(1)=7\), \(y'(1)=21\), tangent \(y=7+21(x-1)\).
  3. For \(G(x)=\int_{1/x}^{x}\dfrac{dt}{t}\), compute \(G'(5)\).
    Answer. \(2/5=0.4\).
  4. Where does \(\int_x^{x+2}e^{-t^2}dt\) have its maximum?
    Answer. \(e^{-(x+2)^2}=e^{-x^2}\) gives \(x=-1\).

Check Your Understanding

Work these without looking back.

  1. Differentiate \(\int_{2x}^{x^2}\sqrt{1+t^4}\,dt\).
  2. Find \(\dfrac{d}{dx}\int_{-x}^{x}f(t)\,dt\) in terms of \(f\).
  3. Simplify \(\int_{x}^{x^2}2t\,dt\) first, then differentiate. Compare with the formula.
  4. Explain why \(y(1)=0\) in Example 1 without computing any antiderivative.
  5. Find the critical points of \(\int_x^{x+1}\sin(t^2)\,dt\) in terms of an equation.

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