If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Understanding the trapezoidal rule

AP.CALC:
LIM‑5 (EU)
,
LIM‑5.A (LO)
,
LIM‑5.A.1 (EK)
,
LIM‑5.A.2 (EK)
,
LIM‑5.A.3 (EK)
,
LIM‑5.A.4 (EK)
Walk through an example using the trapezoid rule, then try a couple of practice problems on your own.
By now you know that we can use Riemann sums to approximate the area under a function. Riemann sums use rectangles, which make for some pretty sloppy approximations. But what if we used trapezoids to approximate the area under a function instead?
Key idea: By using trapezoids (aka the "trapezoid rule") we can get more accurate approximations than by using rectangles (aka "Riemann sums").

An example of the trapezoid rule

Let's check it out by using three trapezoids to approximate the area under the function f, left parenthesis, x, right parenthesis, equals, 3, natural log, left parenthesis, x, right parenthesis on the interval open bracket, 2, comma, 8, close bracket.
Here's how that looks in a diagram when we call the first trapezoid T, start subscript, 1, end subscript, the second trapezoid T, start subscript, 2, end subscript, and the third trapezoid T, start subscript, 3, end subscript:
Recall that the area of a trapezoid is h, left parenthesis, start fraction, b, start subscript, 1, end subscript, plus, b, start subscript, 2, end subscript, divided by, 2, end fraction, right parenthesis where h is the height and b, start subscript, 1, end subscript and b, start subscript, 2, end subscript are the bases.

Finding the area of T, start subscript, 1, end subscript

We need to think about the trapezoid as if it's lying sideways.
The height h is the 2 at the bottom of T, start subscript, 1, end subscript that spans x, equals, start color #1fab54, 2, end color #1fab54 to x, equals, start color #ca337c, 4, end color #ca337c.
The first base b, start subscript, 1, end subscript is the value of 3, natural log, left parenthesis, x, right parenthesis at x, equals, start color #1fab54, 2, end color #1fab54, which is 3, natural log, left parenthesis, start color #1fab54, 2, end color #1fab54, right parenthesis.
The second base b, start subscript, 2, end subscript is the value of 3, natural log, left parenthesis, x, right parenthesis at x, equals, start color #ca337c, 4, end color #ca337c, which is 3, natural log, left parenthesis, start color #ca337c, 4, end color #ca337c, right parenthesis.
Here's how all of this looks visually:
Let's put this all together to find the area of T, start subscript, 1, end subscript:
T, start subscript, 1, end subscript, equals, h, left parenthesis, start fraction, b, start subscript, 1, end subscript, plus, b, start subscript, 2, end subscript, divided by, 2, end fraction, right parenthesis
T, start subscript, 1, end subscript, equals, 2, left parenthesis, start fraction, 3, natural log, left parenthesis, start color #1fab54, 2, end color #1fab54, right parenthesis, plus, 3, natural log, left parenthesis, start color #ca337c, 4, end color #ca337c, right parenthesis, divided by, 2, end fraction, right parenthesis
Simplify:
T, start subscript, 1, end subscript, equals, 3, left parenthesis, natural log, left parenthesis, start color #1fab54, 2, end color #1fab54, right parenthesis, plus, natural log, left parenthesis, start color #ca337c, 4, end color #ca337c, right parenthesis, right parenthesis

Finding the area of T, start subscript, 2, end subscript

Let's find the height and both of the bases:
h, equals, 2
b, start subscript, 1, end subscript, equals, 3, natural log, left parenthesis, 4, right parenthesis
b, start subscript, 2, end subscript, equals, 3, natural log, left parenthesis, 6, right parenthesis
Plug in and simplify:
T, start subscript, 2, end subscript, equals, 3, left parenthesis, natural log, left parenthesis, 4, right parenthesis, plus, natural log, left parenthesis, 6, right parenthesis, right parenthesis

Find the area of T, start subscript, 3, end subscript

T, start subscript, 3, end subscript, equals
Choose 1 answer:
Choose 1 answer:

Finding the total area approximation

We find the total area by adding up the area of each of the three trapezoids:
start text, T, o, t, a, l, space, a, r, e, a, end text, equals, T, start subscript, 1, end subscript, plus, T, start subscript, 2, end subscript, plus, T, start subscript, 3, end subscript
Here's the final simplified answer:
start text, T, o, t, a, l, space, a, r, e, a, end text, equals, 3, left parenthesis, natural log, 2, plus, 2, natural log, 4, plus, 2, natural log, 6, plus, natural log, 8, right parenthesis
You should pause here and walk through the algebra to make sure you understand how we got this!

Practice problem

Choose the expression that uses four trapezoids to approximate the area under the function f, left parenthesis, x, right parenthesis, equals, 2, natural log, left parenthesis, x, right parenthesis on the interval open bracket, 2, comma, 8, close bracket.
Choose 1 answer:
Choose 1 answer:

Challenge problem

Choose the expression that uses three trapezoids to approximate the area under the function f on the interval open bracket, minus, 1, comma, 5, close bracket.
Choose 1 answer:
Choose 1 answer:

Want to join the conversation?

  • blobby green style avatar for user Chris Benjamin
    In the answers for every problem why is everything but the first and last term times 2? Why isn't everything times 2?
    (15 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user stevenking450
      The first and last terms are the outer bases of the trapezoids on each end of the graph, whereas the inner terms are the bases of the two trapezoids either side of the term. So when you sum the areas of all the trapezoids you can simplify by saying 2 times the inner terms, rather than adding them twice.
      (48 votes)
  • aqualine tree style avatar for user Rafael Nadal
    Where is he getting the ln(x) from?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Bashir Alam
    Is there any formula to find the error? like the trapezoid method gives us approximate area, so can we have some solutions to find the range for this approximation?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user kathrynjade777
    So I'm learning Numerical Integration. It is part of numerical integration? Is the Trapezoid Rule a derivation of Riemann's Sums?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • orange juice squid orange style avatar for user Quasar
    It looks like there might be an error in the solution for the second last problem. In the working out for T3 it shows:

    T3 = (1/2)(2ln(5)+2ln(6.5))*(3/2) = (3/2)(ln(5)+3ln(6.5))

    But that 3 in front of the ln(6.5) on the RHS of the equation shouldn't be there, should it?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user lizloveslife
    the last question I don't understand how its plus two on each interval and where that came from? also, why is it only on the first and second intervals where we add the two and not the last two?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Rishabh
    From the different Riemann sum methods (Left, Right, Midpoint, Trapezoid), would the Trapezoidal sums be the most accurate?
    It seems like they would be, unless there are other methods that I'm not aware of?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user 石乐志大师
    Instead of integrating, why do we need to learn left, right, midpoint, trapezoid sums that give us inaccurate answers?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user John
    It's unclear what the objective is?
    If the objective is how to find the proximate area using Calculus that's OK, but I believe there is a much simpler way, that should give you the exact area by simply building boxes or rectangles over the entire area and dividing by 2, in the same way as you would find the area of a triangle, or have I missed the point of the entire thing?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • starky tree style avatar for user {Rayeed}^3
    Are the formulae for midpoint sums and trapezoidal sums same ?
    (0 votes)
    Default Khan Academy avatar avatar for user