Approximating integrals with an adaptive Gaussian quadrature at 15 points: gaussquad

### 10.3.4 Approximating integrals with an adaptive Gaussian quadrature at 15 points: gaussquad

The gaussquad command finds an approximate value of an integral, calculated by an adaptive method by Ernst Hairer which uses a 15-point Gaussian quadrature.

- gaussquad takes four arguments:
  - expr, an expression.
  - var, the variable used by the expression.
  - a,b, two numbers.
- gaussquad(expr ⟨,var⟩ a,b) returns an approximation of the integral ∫abexprdvar.

#### Examples.

- Input:
  gaussquad(exp(x^2),x,0,1)
  Output:

  1.46265174591

- Input:
  gaussquad(exp(-x^2),x,-1,1)
  Output:

  1.49364826562