| ooura_fourier_integrals | R Documentation |
Computing Fourier sine and cosine integrals using Ooura's method.
ooura_fourier_sin(
f,
omega = 1,
relative_error_tolerance = sqrt(.Machine$double.eps),
levels = 8
)
ooura_fourier_cos(
f,
omega = 1,
relative_error_tolerance = sqrt(.Machine$double.eps),
levels = 8
)
f |
A function to integrate. It should accept a single numeric value and return a single numeric value. |
omega |
The frequency parameter for the sine integral. |
relative_error_tolerance |
The relative error tolerance for the approximation. |
levels |
The number of levels of refinement to apply. Default is 8. |
A single numeric value with the computed Fourier sine or cosine integral, with attribute 'relative_error' indicating the relative error of the approximation.
# Fourier sine integral of sin(x) with omega = 1
ooura_fourier_sin(function(x) { 1 / x }, omega = 1)
# Fourier cosine integral of cos(x) with omega = 1
ooura_fourier_cos(function(x) { 1/ (x * x + 1) }, omega = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.