unitCube_BFN4-class: An S4 class to represent the function sum_{i=1}^{n}(-1)^i...

unitCube_BFN4-classR Documentation

An S4 class to represent the function \sum_{i=1}^{n}(-1)^i \prod_{j=1}^{i} x_j on [0,1]^n

Description

Implementation of the function

f \colon [0,1]^n \to (-\infty,\infty),\, \vec{x} \mapsto f(\vec{x}) = \sum_{i=1}^{n}(-1)^i \prod_{j=1}^{i} x_j

, where n \in \{1,2,3,\ldots\} is the dimension of the integration domain C_n = [0,1]^n. The integral is known to be

\int_{C_n} f(\vec{x}) d\vec{x} = -(1-(-1/2)^n)/3.

Details

The instance needs to be created with one parameter representing the dimension n.

Slots

dim

An integer that captures the dimension

Author(s)

Klaus Herrmann

Examples

n <- as.integer(3)
f <- new("unitCube_BFN4",dim=n)

multIntTestFunc documentation built on April 19, 2023, 5:07 p.m.