numerical integration theorem of residues

4 views (last 30 days)
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!

Accepted Answer

Torsten
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
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 ?
Euclides
Euclides on 8 Mar 2023
Edited: Euclides on 8 Mar 2023
very likely yes. I'll get back to you as soon as I've fully implemented the stepwise approach you suggest, but I'm engaged in multiple fronts, so that might take a while. Thanks a lot for the help Torsten!

Sign in to comment.

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!