I want to calculate the integral $$\int_0^1\frac{1}{x+3}\, dx$$ with the Gaussian quadrature formula that integrates exactly all polynomials of degree $$6$$.

First of all do we have to transform the intervall of the integral, i.e. to shift it from $$[0,1]$$ to $$[-1,1]$$, or not?

Then I thought that it holds the following:

The gaussian quadrature integrates exactly polynomials $$\Phi (x)$$ with maximum degree $$2n-1$$. $$2n-1$$ is an odd degree but we have in this case the degree $$6$$, which is even.

What do we have to do in this case? Or is the way I am thinking wrong?

The answer to your first question is yes, you have to transfer the interval to $$[-1,1]$$ in order to apply the Gaussian Quadrature. The transformation $$x=\frac {t+1}{2}$$ would do the trick.
For your second question you need to consider $$n=4$$ so you get $$2n-1=7$$ which covers the polynomials of degree 7 as well as polynomials of degree 6. Clearly $$n=3$$ is not sufficient because you get $$2n-1=5$$
• So can we determine the Gaussian quadrature formula only at $[-1,1]$ ? Which is the weight function in this case? – Mary Star Feb 5 at 19:45
• The coefficients $c_i$ and the nodes $t_i$ are listed in numerical texts. Once you made the transformation to $t$ you apply the quadrature formula to approximate the integral. – Mohammad Riazi-Kermani Feb 6 at 0:27
• But for the calculations of $c_i$ and $t_i$ do we not need the weight function? – Mary Star Feb 6 at 20:08
• You need $f(t_i)$ and $c_i$ to find the quadrature. – Mohammad Riazi-Kermani Feb 6 at 20:23
• I got stuck right now. In general we have an integral $\int_{-1}^1f(x)\cdot w(x)\, dx$, or not If we have $w(x)=1$ do we consider the Legendre polynomials? – Mary Star Feb 6 at 20:32