4

I am reading Numerical Analysis and I have some problems on how to use in practice the definition of the '$\textbf{Degree of Exactness}$'.

$\textbf{Definition:}$ Let $I_n(f)$ be a quadrature formula for integrating $f$ in the interval $[a,b]$ and $I(f)$ be the actual value of the integral. The Degree of Exactness of a quadrature formula is defined as the maximum integer $r\geq0$ for which $I_n(f)=I(f)$, $\forall f \in \mathbb{P}_r$ ($f$ is from the polynomials of degree $r$).

I understand the definition but how can I use it to compute the actual degree of exactness of a quadrature formula, for example the following question and the following theorem (from Numerical Mathematics, Quarteroni).

$\textbf{Example:}$

Compute the degree of exactness for the formula: $$I_3(f)=\frac{1}{4}[f(-1)+f(-\frac{1}{3})+f(\frac{1}{3})+f(1)]$$

$\textbf{Theorem:}$

Any interpolating quadrature formula that makes use of $n+1$ distinct points has degree of exactness equal to at least $n$.

And could anyone please provide any links to some examples of this type or maybe some reading that explain this subject in depth.

Albanian_EAGLE
  • 1,206
  • 1
  • 16
  • 26
  • The language of the Theorem you quote has to be understand as requiring a quadrature formula that is exact for any polynomial of degree at most $n$ interpolating $n+1$ points with distinct arguments. – hardmath Dec 05 '13 at 16:42

1 Answers1

5

It's easier than you are making it. To show degree of exactness $r$, it suffices to check exactness on a basis of polynomials of degree $r$, e.g. check $1,x,\ldots,x^r$. This check is also a necessary condition, so it's pretty efficient.


Added: Let's try to address the example given in the Question:

$$ I_3(f) = \frac{1}{4}[f(-1)+f(-1/3)+f(1/3)+f(1)] $$

According the Comments by Albanian_EAGLE, no mention is made of what interval this "Lagrange quadrature" rule should apply to. Let's try to discover what interval give us the highest 'Degree of Exactness'.

Considering its use with constants, $I_3(1) = 1$. This is correct only on an interval of length 1, so the natural supposition that it should be used for $[-1,1]$, the smallest real interval containing the quadrature nodes, must be incorrect (since that interval is length 2).

The next best guess is an interval of length 1 that is centered on the origin, namely $[-\frac{1}{2},\frac{1}{2}]$. Not only is $I_3(1) = 1$ exact for this smaller interval, we also have (by symmetry about the origin) that $I_3(x) = 0$ is exact.

Thus for $[-\frac{1}{2},\frac{1}{2}]$ the quadrature rule is exact for polynomials of degree $r \le 1$. However $I_3(x^2) = \frac{5}{9}$ while $\int_{0.5}^{0.5} x^2 dx = \frac{1}{12}$, so that $r = 1$ is the highest degree for which the quadrature rule is exact on this smaller interval.

hardmath
  • 37,015
  • but on which interval should I check the integral since the question doesn't say anything? should I assume $[-1,1]$ but this I think doesn't give the right result. – Albanian_EAGLE Dec 05 '13 at 22:23
  • If you are referring to the "example", $\frac{1}{4}[f(-1)+f(-\frac{1}{3})+f(\frac{1}{3})+f(1)]$, then right, this doesn't give the right result for $[-1,1]$ even for constants (since the integral of 1 on $[-1,1]$ is 2, not 1 as the rule gives). When we specify a quadrature rule, we must specify the interval to which it gives approximate integrals (and then it makes sense to check degrees of polynomials for which the approxmiation is actually exact). Check the textbook (or wherever you found this "example") and look for the place where the rule is specified. – hardmath Dec 06 '13 at 00:23
  • Having said that, a rule which "works" for (say) interval $[-1,1]$ can be modified to work for another interval $[a,b]$ where $a\lt b$. So generally one says what the rule is on $[-1,1]$ or $[0,1]$, leaving it to the Reader to make the necessary modification for integration on general intervals. – hardmath Dec 06 '13 at 00:28
  • it just says that $I_3(f)$ is a Lagrange quadrature , nothing on which interval is this rule defined... – Albanian_EAGLE Dec 06 '13 at 00:31
  • @Albanian_EAGLE: See my added remarks about your example. – hardmath Dec 06 '13 at 03:05