Description Usage Arguments Details References See Also Examples
The function returns a vector of length 2 whose first element is the integration and whose second element is the number of function evaluations required.
1 | trapezoid_rp_adpt(ftn, a, b, tol = 10^(-8), trace = FALSE)
|
ftn |
a function of single variable. |
a |
lower bound of the integration. Must be finite. |
b |
upper bound of the integration. Must be finite and assume b > a. |
tol |
the partition used is recursively refined until the estimate on successive partitions differs by at most tol. |
trace |
if trace is TRUE then intermediate results are printed. |
The variable tol is the tolerant error of the approximated integration and the partitions are randomly selected by uniform distribution [a, b]. The uniform distribution has density f(x) = 1/(max - min) for min ≤ x ≤ max. t.recursion is the function that recursively improves the partitions such that the summation of the errors is less than the tolerant error.
Owen Jones,Robert Maillardet,Andrew Robinson (2014).Introduction to Scientific Programming and Simulation Using R ; Second Edition
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.