MATLAB integral3

The integral3 function calculates an integral with respect to three variables.


Usage

The integral3 function takes seven arguments: a function handle, the bounds of integration of the outermost integral, the bounds of integration of the next outermost integral, and the bounds of integration of the innermost integral. Order matters because the bounds of an inner integral can reference the variables of an outer integral, whereas the bounds of the outermost integral must be a literal value.

syms theta r z;

% Define function with specifically ordered arguments.
f = @(theta,r,z) (r.^2);

% Define bounds of integration in terms of the other variables. Order of arguments must match the above.
zmin = @(theta,r,z) r.^3;
zmax = @(theta,r,z) r;

% Calculate. Order of bounds of integration must match the above.
integral3(f, 0,pi/3, 0,1, zmin,zmax);

See also integral and integral2.


CategoryRicottone

MATLAB/Integral3 (last edited 2026-01-05 17:11:11 by DominicRicottone)