# Gauss-Legendre quadrature rule question In the working below, i understand the Gauss Legendre quadrature rule has degree of precision 3 and hence it is exact for polynomials of degree at most 3, which includes the Hermite interpolating polynomial $H_3(x)$.

Then, according to the quadrature rule, $\int_{-1}^{3} H_3(x) dx = c_{0}\cdot H_3(x_0) + c_1\cdot H_3(x_1)$.

But, in the working it is shown as just a sum of $H_3(x_o)$ and $H_3(x_1)$.

Why is it so?

And also, how should i properly expand an integral in the absolute function?

Can someone show me the full workings for the expansion of the absolute error?

Many thanks!

## 1 Answer

We have $c_0=c_1=1$ because Gauss-Legendre quadratre is interpolatory. On the other hand, it follows immediately by its precision. To be exact on $1$ function we should have $c_0+c_1=2$. To be exact on $x$ we have $(-c_0+c_1)\frac{\sqrt{3}}{3}=0$. Hence $c_0=c_1=1$.

• In fact it is enough to use the interpolatory property, i.e. exactness on polynomials of order 1. That is why I used only two conditions instead of 4. The remaining 2 agree with them. It is easy to compute the weights of interpolatory quadratures. They are of the form $$c_i=\int_{-1}^1 l_i(x)dx,$$ where $l_i$ are basic Lagrange polynomials. I recall that the $n$-point quadrature is interpolatory id it is exact on polynimials of order $n$. More you can read in the excellent exposition Quadrature theory given by Brass and Petras. – szw1710 May 2 '17 at 10:12
• For $f(x)=1$ we get $\int_{-1}^1 dx=2$ and the Gauss-Legendre quadrature is $c_0\cdot 1+c_1\cdot 1$, so by exactness you have $c_0+c_1=2$. The same with $f(x)=x$. As I said before this agrees with $f(x)=x^2$ and $f(x)=x^3$. – szw1710 May 2 '17 at 10:17