I would like to know which is the best way to integrate numerically Legendre polynomials. I am building up a Discontinuous Galerkin CFD code for which Legendre polynomials are used as basis functions in the spectral projection.
In previous codes, I was used to employ Gauss-Legendre numerical quadrature, where only $k$ points allowed to obtain the exact integral of a polynomial of degree $2k−1$. Now, as such quadrature points are the roots of Legendre polynomials, I need use $k+1$ points to integrate the $k$-th Legendre polynomial (otherwise the polynomials are evaluated at their roots and all higher order ingegrals are zero). Is there any other efficient way to do it?
Thank you very much for your help.