Krista King Math | Online math help

View Original

Trapezoidal rule to estimate area under the curve

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 ???n??? subintervals, and then find the width of the subintervals. We call the width ???\Delta{x}???. The larger the value of ???n???, the smaller the value of ???\Delta{x}???, and the more accurate our final answer.

The formula for trapezoidal rule is

???\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]??? are the endpoints of the interval. ???\Delta{x}??? is

???\Delta{x}=\frac{b-a}{n}???

where ???n??? is the number of trapezoids, and the subintervals are defined by ???[x_0,x_1]???, ???[x_1,x_2]???, ... , ???[x_{n-1},x_n]??? where

???x_0=a???

???x_1=a+\Delta{x}???

???x_2=x_1+\Delta{x}???

...

???x_{n-1}=x_{n-2}+\Delta{x}???

???x_n=x_{n-1}+\Delta{x}???

Trapezoidal rule video example


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=4??? and the trapezoidal rule, approximate the value of the integral.

???\int^6_2e^{x^2}\ dx???

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

???\Delta{x}=\frac{b-a}{n}???

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

???\Delta{x}=\frac{6-2}{4}???

???\Delta{x}=1???

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

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

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+1??? terms.

???\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]???

???\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]???

???\int^6_2e^{x^2}\ dx\approx2.16\times10^{15}???

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


Get access to the complete Calculus 2 course