1
$\begingroup$

I have to determine the degree of accuracy/precision for these quadrature rules for approximating the integral:

$∫_{-1}^{1} f(x) dx$

In these two cases:

$∫_{-1}^{1} f(x) dx ≈ f(1) + f(-1)$

$∫_{-1}^{1} f(x) dx ≈ \frac{2}{3}(f(-1) + f(0) + f(1))$

So far I have tried to plug in $x^k$ for $k= 0,1,2,3....n$

This shows that everytime I have a odd power i get 0.

How do I interpret this? Am I on right track?

$\endgroup$
3
  • $\begingroup$ One common way to assess the accuracy of a quadrature rule is the highest degree polynomial for which it is exact. Another is to actually give an error bound for some larger class of functions, for example functions with some number of continuous derivatives. Which one are you doing here? $\endgroup$
    – Ian
    Apr 5, 2021 at 19:22
  • $\begingroup$ Thank you for your reply. I am doing the first one: the highest degree polynomial for which it is correct. $\endgroup$
    – bestmate21
    Apr 5, 2021 at 20:34
  • $\begingroup$ Well as you say, it's exact for any odd power, but what happens to $x^2$? $\endgroup$
    – Ian
    Apr 6, 2021 at 0:30

1 Answer 1

0
$\begingroup$

As the integral $\int_{-a}^a f(x) \ dx$ of an odd map is always equal to zero, and the two given formulas also vanish for odd maps, what you discovered for odd monomials is normal.

While the two formulas are valid for constant maps, they are not exact for $x \mapsto x^2$.

$\endgroup$
1
  • $\begingroup$ The second one is wrong for $x^2$ also: $\int_{-1}^1 x^2 dx = 2/3$ while this formula gives $4/3$. Maybe you were thinking of $\frac{1}{3}(f(-1)+4f(0)+f(1))$ i.e. Simpson's rule with one subinterval. $\endgroup$
    – Ian
    Apr 6, 2021 at 16:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .