二重和三重积分

integral2 {pracma} R Documentation

Numerically Evaluate Double and Triple Integrals

Description

Numerically evaluate a double integral, resp. a triple integral by reducing it to a double integral.

Usage


integral2(fun, xmin, xmax, ymin, ymax, sector = FALSE,
            reltol = 1e-6, abstol = 0, maxlist = 5000,
            singular = FALSE, vectorized = TRUE, ...)

integral3(fun, xmin, xmax, ymin, ymax, zmin, zmax,
            reltol = 1e-6, ...)

Arguments

fun

function

xmin, xmax

lower and upper limits of x.

ymin, ymax

lower and upper limits of y.

zmin, zmax

lower and upper limits of z.

sector

logical.

reltol

relative tolerance.

abstol

absolute tolerance.

maxlist

maximum length of the list of rectangles.

singular

logical; are there singularities at vertices.

vectorized

logical; is the function fully vectorized.

..

additional parameters to be passed to the function.

example

 

 

 double<-function(x,y){ + ifelse(x+y>=1,6*x*y^2,0)} 

> integral2(double,0,1,0,1) $Q
[1] 0.9072746

$error
[1] 7.325264e-08

 

 
 
 
> double<-function(x,y){ + 6*x*y^2} > 
integral2(double,1/2,3/4,0,1) 
$Q
[1] 0.3125

$error
[1] 6.938894e-18



 

 

 


 

你可能感兴趣的:(二重和三重积分)