SimpsonInt: Simpson numerical integration

Description Usage Arguments Details Value References

Description

Implements Simpson's extended numerical integration rule

Usage

1
SimpsonInt(xin, h)

Arguments

xin

A vector of data points

h

grid length

Details

The extended numerical integration rule is given by

\int_0^{x_{2n}} f(x)\,dx = \frac{h}{3}(f(x_0) + 4\{f(x_1) + … f(x_{2n-1}) \} +2 \{f(x_2) + f(x_4) + … f(x_{2n-2})\} + f(x_{2n})) -R_n

Value

returns the approximate integral value

References

Weisstein, Eric W. "Simpson's Rule." From MathWorld–A Wolfram Web Resource


NPHazardRate documentation built on May 2, 2019, 10:24 a.m.