The Trapezoid Rule

The Trapezoid Rule
$\begingroup$

I was learning about the Trapezoid from Paul's Online Notes (a great resource!). He mentions that "all function evaluations, with the exceptions of the first and last, are multiplied by two."

What does this mean? How does this look practically?

This is the link to the page:

$\endgroup$
2

1 Answer

$\begingroup$

The trapezoidal rule for numerical approximation of an integral is $$\int _a^b f(x)dx \approx $$

$$ T= ( h/2)[f(x_0)+2f(x_1) + 2f(x_2) +...+ 2f(x_{n-1}) + f(x_n)]$$

Where the interval $[a,b]$ is divided into $n$ sub-intervals of size $h=(b-a)/n$ with partition points of $$\{a=x_0, x_1, x_2,...,x_n=b\}$$

The reason for multiplying some $f(x_i)$ by $2$ is the $f(x_i)$ is shared by two adjacent trapezoids so it counts twice in finding the total areas of trapezoids.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.