For an integral of form $\int_{-2}^2 x^2e^xdx$, calculate the Newton-Cotes quadrature and estimate the error for:

  • $n=1$ (Trapezoid rule)
  • $n=2$ (Simpson's rule)
  • $n=3$ (3/8 rule)

So I know the formulas for the errors but I don't know what I'm supposed to plug into the formulas... It's very hard to find some examples rather than raw definitions so I'm kind of stuck. Should I solve the initial integral as if it were a regular integral to move on or I'm to plug something into the formula right from the beginning?

I mean: how do I benefit from knowing that the integral is equal to $ \frac{2 (e^4-5)}{e^2}\approx13.4248$?


First, please be more specific on a number of points: 1) are you using open or closed Newton Cotes formulae?; 2) which formulae exactly have you tried and which terms don't you understand?

Still, here is the general outline on calculating the error terms. Assume we have order $n$, and let the quadrature term be $Q_{n}(f)$. Then for the error we have


The upper bound for the error term is given in terms of

$M_{n+1}:=\mathrm{max}_{a\leq x\leq b}|f^{(n+1)}(x)|$

For example, for the Trapezoid rule we have $n=1$ and $\mathrm{err}_{1}\leq\frac{(b-a)^{3}}{12}M_{2}$.

Hope this helps.

  • $\begingroup$ The closed ones. I've tried all four from here: en.wikipedia.org/wiki/… but I just don't even know what I should use for the variables there... $\endgroup$ – Straightfw Apr 20 '13 at 17:54
  • $\begingroup$ Also, I don't know what's the sought form of the quadrature itself - as I said, I know it's $2(e^4-5)/e^2$ but do I have to transform it to a logarithm form? In all the examples I found, the results were in a form of logarithms. Do I need such form? Why? $\endgroup$ – Straightfw Apr 20 '13 at 17:55
  • $\begingroup$ logarithms? there are no logarithms in Newton Cotes (even in Wikipedia article). What do you refer to? $\endgroup$ – ConciseAndClear Apr 20 '13 at 17:59
  • $\begingroup$ Oh, silly me. I just looked at it again and the logarithms they use are there because they're the result of the initial integral :) Sorry. However: could you please tell me what are the b and a in the formulas I've shown on Wikipedia? I believe it'd be enough to get me started. $\endgroup$ – Straightfw Apr 20 '13 at 18:03
  • $\begingroup$ Oh, they're just the bounds of the integral, I get it! Will update if I find another obstacle ;) $\endgroup$ – Straightfw Apr 20 '13 at 18:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.