numerical integration theorem of residues

3 vues (au cours des 30 derniers jours)
Euclides
Euclides le 6 Mar 2023
Modifié(e) : Euclides le 8 Mar 2023
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!

Réponse acceptée

Torsten
Torsten le 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 commentaires
Torsten
Torsten le 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 le 8 Mar 2023
Modifié(e) : Euclides le 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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by