Trapezoidal rule to estimate area under the curve

 
 
Trapezoidal rule blog post.jpeg
 
 
 

Trapezoidal rule approximates area under the curve

The trapezoidal rule is one method we can use to approximate the area under a function over a given interval. If it’s difficult to find area exactly using an integral, we can use trapezoidal rule instead to estimate the integral. It’s called trapezoidal rule because we use trapezoids to estimate the area under the curve.

With this method, we divide the given interval into nn subintervals, and then find the width of the subintervals. We call the width Δx\Delta{x}. The larger the value of nn, the smaller the value of Δx\Delta{x}, and the more accurate our final answer.

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 

The formula for trapezoidal rule is

abf(x) dxΔx2[f(x0)+2f(x1)+2f(x2)+...+2f(xn2)+2f(xn1)+f(xn)]\int_a^b f(x)\ dx\approx\frac{\Delta{x}}{2}\left[f(x_0)+2f(x_1)+2f(x_2)+...+2f(x_{n-2})+2f(x_{n-1})+f(x_n)\right]

where the limits of integration [a,b][a,b] are the endpoints of the interval. Δx\Delta{x} is

Δx=ban\Delta{x}=\frac{b-a}{n}

where nn is the number of trapezoids, and the subintervals are defined by [x0,x1][x_0,x_1], [x1,x2][x_1,x_2], ... , [xn1,xn][x_{n-1},x_n] where

x0=ax_0=a

x1=a+Δxx_1=a+\Delta{x}

x2=x1+Δxx_2=x_1+\Delta{x}

...

xn1=xn2+Δxx_{n-1}=x_{n-2}+\Delta{x}

xn=xn1+Δxx_n=x_{n-1}+\Delta{x}

 
 

Trapezoidal rule video example


 
Krista King Math Signup.png
 
Calculus 2 course.png

Take the course

Want to learn more about Calculus 2? I have a step-by-step course for that. :)

 
 

 
 

Approximating the value of an integral using trapezoidal rule

Example

Using n=4n=4 and the trapezoidal rule, approximate the value of the integral.

26ex2 dx\int^6_2e^{x^2}\ dx

First, we need to find the the width of the subintervals using

Δx=ban\Delta{x}=\frac{b-a}{n}

where a=2a=2, b=6b=6, and n=4n=4.

Δx=624\Delta{x}=\frac{6-2}{4}

Δx=1\Delta{x}=1

This means that each sub-interval is 11 unit wide. Now we can solve for our sub-intervals using [x0,x1][x_0,x_1], [x1,x2][x_1,x_2], ... , [xn1,xn][x_{n-1},x_n] where x0=2x_0=2 (we start here because it’s our lower limit of integration), x1=3x_1=3, x2=4x_2=4, x3=5x_3=5, and x4=6x_4=6 (we end here because it’s our upper limit of integration).

[2,3][2,3], [3,4][3,4], [4,5][4,5], [5,6][5,6]

Trapezoidal rule for Calculus 2.jpg

If it’s difficult to find area exactly using an integral, we can use trapezoidal rule instead to estimate the integral.

Now we’re ready to plug these values into our trapezoidal rule formula. Remember, since we include the start and endpoints of our interval, we’ll always have n+1n+1 terms.

abf(x) dxΔx2[f(x0)+2f(x1)+2f(x2)+...+2f(xn2)+2f(xn1)+f(xn)]\int_a^b f(x)\ dx\approx\frac{\Delta{x}}{2}\left[f(x_0)+2f(x_1)+2f(x_2)+...+2f(x_{n-2})+2f(x_{n-1})+f(x_n)\right]

26ex2 dx12[e(2)2+2e(3)2+2e(4)2+2e(5)2+e(6)2]\int^6_2e^{x^2}\ dx\approx\frac{1}{2}\left[e^{(2)^2}+2e^{(3)^2}+2e^{(4)^2}+2e^{(5)^2}+e^{(6)^2}\right]

26ex2 dx2.16×1015\int^6_2e^{x^2}\ dx\approx2.16\times10^{15}

Using the trapezoidal rule, our approximate area is 2.16×10152.16\times10^{15} units.

 
Krista King.png
 

Get access to the complete Calculus 2 course