Calculates the definite double integral of a function f(x, y) over a polar region R, defined by constant limits for theta and functional limits for the radius r, R: \(g1(theta) <= r <= g2(theta)\), \(alpha <= theta <= beta\). The integration order used is r dr dtheta. Uses the Composite Simpson's Rule for numerical approximation.
integrate_double_polar(
f,
theta_min,
theta_max,
r_limit1,
r_limit2,
n_theta = 100,
n_r = 100,
plot_domain = TRUE
)A list containing:
integral_value: The calculated approximation of the integral.
domain_plot: The ggplot2 object representing the domain (if plot_domain = TRUE).
A function R of two variables, f(x, y), returning a numeric value (the original integrand).
The constant lower limit for the outer integral (alpha).
The constant upper limit for the outer integral (beta).
A function R of one variable defining the inner integral's lower limit (r = g1(theta)).
A function R of one variable defining the inner integral's upper limit (r = g2(theta)).
Number of subintervals for the outer integration (theta). Must be even. Default is 100.
Number of subintervals for the inner integration (r). Must be even. Default is 100.
Logical. If TRUE, generates a ggplot2 plot of the integration domain in the Cartesian plane. Default is TRUE.