int | R Documentation |
If no limits are provided, the indefinite integral is calculated. Otherwise, if both limits are provided, the definite integral is calculated.
int(f, var, lower, upper, doit = TRUE)
f |
Function to integrate |
var |
Variable to integrate with respect to (either string or |
lower |
Lower limit |
upper |
Upper limit |
doit |
Evaluate the integral immediately (or later with |
if (has_sympy()) {
x <- symbol("x")
int(1/x, x, 1, 10)
int(1/x, x, 1, 10, doit = FALSE)
int(1/x, x)
int(1/x, x, doit = FALSE)
int(exp(-x^2/2), x, -Inf, Inf)
int(exp(-x^2/2), x, -Inf, Inf, doit = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.