Differences between revisions 2 and 3
Revision 2 as of 2025-12-17 21:13:06
Size: 1099
Comment: Link
Revision 3 as of 2026-01-05 17:11:11
Size: 1121
Comment: Link
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The '''`integral3`''' function calculates an integral with respect to three variables. The '''`integral3`''' function calculates an [[Calculus/Integral|integral]] with respect to three variables.

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)