Does MATLAB considers poles while COMPLEX integrating a function?
Show older comments
For example , suppose i want to integrate F(z)=1/(1-z^n) where n is any natural number and z is a complex variable. Now integrating simply
syms z
syms n integer
F=int(1/(1-z^n),z)
This gives us answer in hypergeometric functions. But i want to know does this integration considers poles, as F(z) has a singularity,i.e, pole at z=1 and at nth roots of unity. so, does it consider that?
If not, how can we make it consider that?
Accepted Answer
More Answers (1)
How should it consider it if you ask MATLAB for an antiderivative to a function ? Should it additionally list the poles ?
An antiderivative to f(x) = 1/x^2 , e.g., is F(x) = -1/x. That's all.
If you try to evaluate definite integrals, you can define Waypoints to circumvent poles:
12 Comments
Torsten
on 7 Sep 2023
Do you want to integrate numerically ? What is the path over which you want to integrate for 0 to z ? The straight line ?
simran
on 7 Sep 2023
simran
on 7 Sep 2023
Returning the result as a hypergeometric function is expanding your function in a power series and integrating this power series term by term. Thus you will get an antiderivative, but in the form of an infinite series that will only converge for | z | < 1. Thus your solution and the MATLAB solution in terms of a hypergeometric function will most probably be the same, but only in the unit circle.
For a more general solution, you have to specify n explicitly, e.g.
syms z
f = 1/(1-z^5);
F = int(f)
fplot(F)
But it seems this is a solution for | z | > 1 ...
I suggest you compute the function from the article and the hypergeometric function from MATLAB and compare.
simran
on 7 Sep 2023
I looked at the text you included and saw that the function that is integrated is
(1-z)^(-2) * (1-z^n)^(-1)
Why do you consider only
(1-z^n)^(-1)
?
And yes: I'm sure the MATLAB integral function and the function from the article will be the same for
| z | < 1 (possibly up to a constant value (the constant of integration)).
simran
on 7 Sep 2023
Also, do you know any other methods for solving these kind of integrations? if the MATLAB doesn't solve it with the "int" command.
Why do you write it doesn't solve it with the int-command ? It's just a different representation of the antiderivative (maybe up to a constant of integration).
Bruno Luong
on 7 Sep 2023
Edited: Bruno Luong
on 7 Sep 2023
When you integrate fractions in complex plane on the path, the only term that you need to pay attention is -1 power term:
1/(z-pole)
since the primitive (anti-derivative) is log(z-zpole) and as mathematical log is multi-values function and MATLAB log is mono-value function with discontinuity at the half axis Rel(z) <= 0, you must add k(z)*2*pi whenever it crossthe semi real axis z <= 0 so that the primitive is continue along the path.
All the other terms (with power negative or positive) do not have this problem, the difference of the primitive at the end to the start is alright.
No symbolic system can tell you what is k(z) to add since you haven't specify the path.
Categories
Find more on Mathematics 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!



