Calculates the definite triple integral of a function f(x, y, z) over a general region W defined by the order dz dy dx. The region W is defined by constant limits for the outer integral (x), functional limits depending on x for the middle integral (y), and functional limits depending on both x and y for the inner integral (z). Uses the Composite Simpson's Rule for numerical approximation.
integrate_triple_general(
f,
x_min,
x_max,
y_limit1,
y_limit2,
z_limit1,
z_limit2,
n_outer = 50,
n_middle = 50,
n_inner = 50,
plot_xy_domain = TRUE
)A list containing:
integral_value: The calculated approximation of the integral.
domain_plot: The ggplot2 object representing the xy-projection domain
(if plot_xy_domain = TRUE).
A function in R of three variables, f(x, y, z), returning a numeric value.
The constant lower limit for the outermost integral (x = a).
The constant upper limit for the outermost integral (x = b).
A function in R of one variable defining the middle integral's lower limit (y = h1(x)).
A function in R of one variable defining the middle integral's upper limit (y = h2(x)).
A function in R of two variables defining the inner integral's lower limit (z = g1(x, y)).
A function in R of two variables defining the inner integral's upper limit (z = g2(x, y)).
Number of subintervals for the outermost integral (x). Must be even. Default is 50.
Number of subintervals for the middle integral (y). Must be even. Default is 50.
Number of subintervals for the innermost integral (z). Must be even. Default is 50.
Logical. If TRUE, generates a ggplot2 plot of the projection of the domain W onto the xy-plane. Default is TRUE.