Description Usage Arguments Details Value References
Implements Simpson's extended numerical integration rule
1 | SimpsonInt(xin, h)
|
xin |
A vector of data points |
h |
grid length |
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
returns the approximate integral value
Weisstein, Eric W. "Simpson's Rule." From MathWorld–A Wolfram Web Resource
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.