Triple integral using integral3
12 views (last 30 days)
The following is a triple integral I am trying to compute using MATLAB, (please check link for clear illustration)
f=matlabFunction(fabc) % @(a,b,c)
cmin= @(a,b) b;
Is the code correct? Please note that this is not my real function but I wrote an easy one for purpose of illustration...
Roger Stafford on 24 Nov 2014
The 'integral3' function performs numerical integration for which numerical values must be supplied. The form of your code looks correct for numerical integration except that the 'syms' lines should be removed.
If you want to perform symbolic triple integration, you will have to construct it using the 'int' function in triple form - that is, use it to integrate with respect to 'c' first, then use the answer to integrate with respect to 'b', and finally use that answer to integrate with respect to 'a'. You should be prepared for the possibility of exceedingly long answers with a symbolic triple integral. It may be advisable to apply the 'simplify' command in between the above steps to avoid needless complexity in your answer.