integrateSphereStroud11 function

Integrate a function over the sphere in n-dimensions.

Integrate a function over the sphere in n-dimensions.

Approximate the integral of a function f(x)=f(x[1],...,x[n]) over the unit sphere in n-space using Stroud's method of degree 11.

integrateSphereStroud11(f, n, ...)

Arguments

  • f: function f(x)=f(x[1],...,x[n]) to integrate
  • n: dimension of the space, implemented for n in the range 3:16.
  • ...: optional arguments passed to f( ). If these are specified, they should be labeled with a tag, e.g. param1=3.4

Details

This method works if the integrand is smooth. If the function changes rapidly, adaptive integration can be tried as described in 'See Also' below.

Returns

A single number, the approximation to the integral.

References

Stroud integration and related functions, adapted from fortran code by John Burkhart found at

http://people.sc.fsu.edu/~jburkardt/f77_src/stroud/stroud.html

Based on the book by A. H. Stroud, Approximate Calculation of multiple integrals, 1971, page 296-297.

See Also

adaptIntegrateSpherePolar, adaptIntegrateBallPolar, adaptIntegrateSphereTri

Examples

f2 <- function( x ) { return(x[1]^2) } integrateSphereStroud11( f2, n=3 )
  • Maintainer: John P. Nolan
  • License: GPL (>= 2)
  • Last published: 2021-01-10

Useful links