General integration intervals for Gauss-Legendre

Note that the Gauss-Legendre method is not limited to an interval [-1,1], since we can always through a change of variable $$ \begin{equation*} t=\frac{b-a}{2}x+\frac{b+a}{2}, \end{equation*} $$ rewrite the integral for an interval [a,b] $$ \begin{equation*} \int_a^bf(t)dt=\frac{b-a}{2}\int_{-1}^1f\left(\frac{(b-a)x}{2}+\frac{b+a}{2}\right)dx. \end{equation*} $$