Quadrature exact for polynomials up to degree 3

479 Views Asked by At

Question: Consider the quadrature rule $$\int_{-1}^1 f(x)dx \approx w_{-1}f(-1)+w_0f(0)+w_1f(1)+w'_0f'(0)$$

Compute the weights such that the polynomial is exact up to degree 3.

Answer: When I computed the coefficients I got that $$w_0'=0, w_1=1/3,w_0=4/3,w_{-1}=1/3$$

I was wondering if the fact that one of these weights is $0$ means that I don't get the degree 3 exactness?

I was thinking this since I think I get $n-1$ accuracy when the degree is n.

1

There are 1 best solutions below

0
On BEST ANSWER

Whether or not one (or more than one) of the coefficients is zero is not related to the degree of precision (or exactness if you prefer) of the given quadrature rule. Instead, it depends on how you found these coefficients.

Assuming you found those coefficients by substituting $f(x) = 1, x , x^2, x^3$ into the quadrature rule and solving the $4\times 4$ linear system with variables $w_{-1}, w_0, w_1, w_0'$, then the answer to your question is no; the quadrature rule with coefficients found above is, by construction, exact for polynomials of degree at most 3.