Type: | Package |
Title: | Integration of One-Dimensional Functions with Double Exponential Formulas |
Version: | 0.1.2 |
Description: | Numerical quadrature of functions of one variable over a finite or infinite interval with double exponential formulas. |
URL: | https://github.com/okamumu/deformula/ |
BugReports: | https://github.com/okamumu/deformula/issues |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.0 |
LinkingTo: | cpp11, Rcpp |
Imports: | Rcpp |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
SystemRequirements: | C++11 |
NeedsCompilation: | yes |
Packaged: | 2022-05-30 01:40:50 UTC; r346502 |
Author: | Hiroyuki Okamura |
Maintainer: | Hiroyuki Okamura <okamu@hiroshima-u.ac.jp> |
Repository: | CRAN |
Date/Publication: | 2022-05-30 06:40:15 UTC |
deformula: Integration of One-Dimensional Functions with Double Exponential Formulas
Description
Numerical quadrature of functions of one variable over a finite or infinite interval with double exponential formulas.
Author(s)
Maintainer: Hiroyuki Okamura okamu@hiroshima-u.ac.jp (ORCID)
See Also
Useful links:
Integration of one-dimensional functions over finite interval with the double exponential formula.
Description
Numerical quadrature of functions of one variable over (lower, upper) with the double exponential formula.
Usage
deformula.moneone(
f,
lower,
upper,
...,
zero.eps = 1e-12,
rel.tol = 1e-08,
start.divisions = 8,
max.iter = 12
)
Arguments
f |
An R function taking a numeric first argument. |
lower |
The lower limit of integration. |
upper |
The upper limit of integration. |
... |
Additional arguments to be passed to âfâ. |
zero.eps |
A threshold value to be zero. |
rel.tol |
A relative accuracy requested. |
start.divisions |
An integer. The initial number of subintervals. |
max.iter |
An integer for the maximum number of iterations to increase subintervals. |
Value
A list with components;
value |
A value for integral. |
x |
A vector of subintervals. |
w |
A vector of weights. |
t |
A vector of subintervals for trapezoid integral. |
h |
A value of subinterval. |
message |
OK or a string for the error message. |
Examples
f <- function(x, a) exp(-a*x)
deformula.moneone(f, 0, 1, a=0.1)
Integration of one-dimensional functions over infinite interval with the double exponential formula.
Description
Numerical quadrature of functions of one variable over [0, infinity) with the double exponential formula.
Usage
deformula.zeroinf(
f,
...,
zero.eps = 1e-12,
rel.tol = 1e-08,
start.divisions = 8,
max.iter = 12
)
Arguments
f |
An R function taking a numeric first argument. |
... |
Additional arguments to be passed to âfâ. |
zero.eps |
A threshold value to be zero. |
rel.tol |
A relative accuracy requested. |
start.divisions |
An integer. The initial number of subintervals. |
max.iter |
An integer for the maximum number of iterations to increase subintervals. |
Value
A list with components;
value |
A value for integral. |
x |
A vector of subintervals. |
w |
A vector of weights. |
t |
A vector of subintervals for trapezoid integral. |
h |
A value of subinterval. |
message |
OK or a string for the error message. |
Examples
f <- function(x, a) exp(-a*x)
deformula.zeroinf(f, a=0.1)