unitCube_cos2-class {multIntTestFunc}R Documentation

An S4 class to represent the function (cos(xv))2(\cos(\vec{x}\cdot\vec{v}))^2 on [0,1]n[0,1]^n

Description

Implementation of the function

f ⁣:[0,1]n[0,1],xf(x)=(cos(xv))2,f \colon [0,1]^n \to [0,1],\, \vec{x} \mapsto f(\vec{x}) = (\cos(\vec{x}\cdot\vec{v}))^2,

where n{1,2,3,}n \in \{1,2,3,\ldots\} is the dimension of the integration domain Cn=[0,1]nC_n = [0,1]^n and v\vec{v} is a nn-dimensional parameter vector where each entry is different from 00. The integral is known to be

Cnf(x)dx=12+12cos(j=1nvj)j=1nsin(vj)vj.\int_{C_n} f(\vec{x}) d\vec{x} = \frac{1}{2}+\frac{1}{2}\cos(\sum_{j=1}^{n}v_j)\prod_{j=1}^{n}\frac{\sin(v_j)}{v_j}.

Details

The instance needs to be created with two parameters representing the dimension nn and the nn-dimensional parameter vector where each entry is different from 00.

Slots

dim

An integer that captures the dimension

coeffs

A vector of non-zero parameters

Author(s)

Klaus Herrmann

Examples

n <- as.integer(3)
f <- new("unitCube_cos2",dim=n, coeffs=c(-1,2,-2))

[Package multIntTestFunc version 0.2.0 Index]