QUADF can be nested to compute multiple integrals of any order.
This allows for individualized control of each nested integral such as algorithm selection. To illustrate the process consider a volume integral:
The general steps required to perform the above integral are as follows:
Select variables of integration. For example X1, Y1, Z1 and define formulas for the integrand f(x,y,z), and the limits functions lz(x,y), ly(x), uz(x,y), and uy(x,y) in terms of the selected variables. You may also pass expressions for limits functions directly into the parameters for QUADF formulas as shown in the examples.
In a cell (e.g., A1) enter
QUADF formula for the inner most integral.
In a second cell (e.g., A2) enter
QUADF formula for the middle integral and specify A1 for the integrand.
In a third cell (e.g., A3) enter
QUADF formula for the outer integral and specify A2 for the integrand.
Evaluate A3 to compute the triple integral.
We use X1, Y1 as our integration variables. The integrand formula is defined in A1 and the nested inner and outer integration formulas in A2 and A3 respectively. Evaluating cell A3 computes the double integral result.
We use X1, Y1 as our integration variables. The integrand formula is defined in A4 and the nested inner and outer integration formulas in A5 and A6 respectively. Evaluating cell A6 computes the double integral result.
We use X1, Y1 and Z1 as our integration variables. The integrand formula is defined in A7 and the nested inner, middle and outer integration formulas in A8, A9 and A10 respectively. Here we pass the expressions for the limits directly into the arguments although we could define them as formulas using additional cells and pass their references instead. Evaluating cell A10 computes the triple integral result.