Demonstration of Gaussian Quadrature

Let us here compare three methods for integrating, namely the trapezoidal rule, Simpson's method and the Gauss-Legendre approach. We choose two functions to integrate: $$ \begin{equation*} \int_1^{100}\frac{\exp{(-x)}}{x}dx, \end{equation*} $$ and $$ \begin{equation*} \int_{0}^{3}\frac{1}{2+x^2}dx. \end{equation*} $$