how can I evaluate a four fold integral with four variables numerically ?
Show older comments
i used the functions quad, dblquad, and triplequad to evaluate up to three integrals, but i need to evaluate 4 integrals, how can i do that?
2 Comments
Muthu Annamalai
on 22 Sep 2014
Can you separate the kernel of the integral? This is usally the better way to solve the problem. It also provides a computational speeds up to the solution as well from O(n^4) to say 2*O(n^2) if you can split kernel into a function (product?) of 2 double integrals.
HTH.
ebtehal
on 24 Sep 2014
Accepted Answer
More Answers (1)
Roger Stafford
on 22 Sep 2014
2 votes
Set up a function which, when given the value of the outermost variable of integration, calculates the triple integral of the inner three iterated integrals for the particular value of that fourth variable. Then take the integral of the value of this newly-defined function over the appropriate limits for that fourth variable. There's nothing very difficult about that. Let the computer do all the hard work. You can expect it to take a fairly long time at it. That's inherent in doing integration in four dimensions.
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!