### 9.3.4 Approximate integral with an adaptive Gaussian quadrature at 15 points: gaussquad

The gaussquad command takes four arguments; an expression, the variable used by the expression, and two numbers.
gaussquad returns an approximation to the definite integral of the expression over the limits given by the two numbers. The approximation is calculated by an adaptive method by Ernst Hairer which uses a 15-point Gaussian quadrature.
Input:

gaussquad(exp(x^2),x,0,1)

Output:

1.46265174591

Input:

gaussquad(exp(-x^2),x,-1,1)

Output:

1.49364826562