numerical integration theorem of residues
3 views (last 30 days)
Show older comments
Good afternoon. I have a question on numerical integration. Specifically, I am dealing with a fourth order tensorial integrand that involves sums of (fourth-order-tensor-like) rational functions, whereby the numerator is a polynomial depending on several constant inputs and (one) integration variable theta; and the denominator is also a polynomial depending also on several constant inputs and the same integration variable, but additionally also on the respective polynomial roots. This means that, at each theta, I need to first extract the polynomial roots and then evaluate the polynomial at each of those roots (and at different terms of the aforementioned sum). Is there any way to construct componentwise handles for the built-in Matlab integration function in such a case? Or do I need to construct my own integration for loop, for instance for the trapezoidal rule or some quadrature rule, to be able to extract those polynomial roots at each theta, to finally have my theta-dependent integrand? Looking forward to your answers!
0 Comments
Accepted Answer
Torsten
on 6 Mar 2023
You can define the function to be integrated in a function - you don't need to use handles.
In this function, you can perform all the steps necessary to return f(theta) for a given value of theta.
7 Comments
Torsten
on 8 Mar 2023
Why do you need these nested functions ? Is it not possible, given theta, to compute step by step f(theta) in one function using "roots" within this function to compute the polynomial roots ?
More Answers (0)
See Also
Categories
Find more on Polynomials 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!