Integrate | R Documentation |
Calculates the definite integral of a function. That is, the result of the
integration will be a number. There can be no free parameters in the function
being integrated. (If you want free parameters, use antiD()
.) Integrate()
can
handle integration over up to 3 variables.
Integrate(tilde, domain, ..., tol = 1e-05)
tilde |
A tilde expression describing the function. |
domain |
The domain over which to perform the integration |
... |
values assigned to free parameters in the tilde expression, e.g. a=1 |
tol |
numerical tolerance for integration, see |
For functions constructed as a spline interpolant, Integrate()
can handle
more segments than antiD()
. It's reasonable to do up to 2000 segments with Integrate()
,
whereas antiD()
handles only about 100.
Integrate(dnorm(x) ~ x, domain(x=-2:2))
Integrate(dnorm(x, sd=sigma) ~ x, domain(x=-2:2), sigma=2)
Integrate(sqrt(1- x^2) ~ x, domain(x=-1:1)) # area of semi-circle
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.