1
$\begingroup$

If the trapezoidal rule approximates an integral with trapezoids, then I thought (and was tought in high school) that the formula is:

$ \frac{h}{2}(f(x) + f(x + h))$ Where $h$ is the distance between two points that are close together.

However, when I look up the Trapezoidal Rule online, I get a modified formual: (seethe links below)

http://mathworld.wolfram.com/TrapezoidalRule.html

http://mathworld.wolfram.com/Newton-CotesFormulas.html

Why is the additional term required? How does it change the approximation?

The application is that I am integrating an estimated probability density function. The PDF is estimated from empirical data with Kernel Density Estimation. I am using a Gaussian Kernel. Further, the data must be positive, so I used an approach that is described by Silverman 1998, "Density Estimation for Statistics and Data Analysis".

For each point x, in the dataset, I made another point -1*x. I then estimated the density on the that. I then discarded all of the negative points and multiplied the remaining points by two.

  • 1
    As others have said, that extra term just tells you what the error is in your approximation. You don't actually use that extra term when you are using the trapezoidal rule to approximate an integral. (Knowing that expression for the error allows you to sometimes compute a theoretical upper bound for the error in your approximation.)2012-11-08

0 Answers 0