A problem about residues(is matlab wrong?)

  • MATLAB
  • Thread starter oahsen
  • Start date
  • Tags
    Matlab
In summary, the conversation discusses using MATLAB to find the residue(s) of a function with a pole of order three at z=i/9. The result shows two different values for the residue, 0 and 1, which leads to questioning the accuracy of the residue algorithm of MATLAB. The expert explains that the residue of a pole is the coefficient of 1/(z-a) in the Laurent expansion of the function, and in this case, there is only one residue which is zero. The question about the additional residue value of 1 is left unanswered due to the lack of familiarity with MATLAB.
  • #1
oahsen
59
0
I have written this simple code fragment to the MATLAB for finding the residue(s) of the function 1/(z-i/9)^3;

b=[1];
a=[1 -i/3 -1/27 i/(729) ];
[r p k]=residue(b,a)

and get the following result;
r =

0
0
1


p =

0.0000 + 0.1111i
0.0000 + 0.1111i
0.0000 + 0.1111i


k =

[]

The poles are true. Function has a pole of order three at z=i/9 . However, there are two different values for the residue: 0 and 1. I could not get the meaning behind that? How can a function have different residue at the same point? Additionally if we assume MATLAB is right then the result of the contour integral should be 2pi*i at the unit circle. However, we can easily show that this contour integral is zero. So, is something wrong with the residue algorithm of MATLAB or there is something I do not consider?
 
Physics news on Phys.org
  • #2
The residue of a pole in a function f(z) at z=a is the coefficient of 1/(z-a) in the Laurent expansion of f(z). In your case, a=i/9 and the coefficeint of 1/(z-i/9) is zero. So the residue (there is only one residue!) is zero.
 
  • #3
Avodyne said:
The residue of a pole in a function f(z) at z=a is the coefficient of 1/(z-a) in the Laurent expansion of f(z). In your case, a=i/9 and the coefficeint of 1/(z-i/9) is zero. So the residue (there is only one residue!) is zero.

Yes, logically it should have only one residue which is zero. However, what I did not understand is why has MATLAB find also a residue which is 1 at the pol z=i/9 ?
 
  • #4
I don't use MATLAB so I can't help.
 

What is a problem about residues in Matlab?

A problem about residues in Matlab refers to issues that arise when calculating the residues of a function using Matlab. It is a common topic in mathematics and engineering, as residues play a crucial role in solving complex integrals.

How do I know if Matlab is giving incorrect residue values?

If you suspect that Matlab is giving incorrect residue values, you can manually calculate the residues using the residue formula and compare them to the values obtained from Matlab. Additionally, you can check your input and make sure there are no errors or typos.

Why does Matlab sometimes give incorrect residue values?

There could be several reasons why Matlab gives incorrect residue values. One possibility is that the function being evaluated is not analytic at the pole, leading to incorrect residue values. Another reason could be numerical errors or incorrect input from the user.

How can I troubleshoot a problem with residues in Matlab?

To troubleshoot a problem with residues in Matlab, you can check your input, make sure the function is analytic at the pole, and manually calculate the residues to compare with Matlab's output. You can also consult online resources or seek help from a Matlab expert.

Is Matlab the best tool for calculating residues?

While Matlab is a popular software for calculating residues, it is not the only tool available. Other software like Mathematica and Maple also have functions for computing residues. The best tool for calculating residues may vary depending on the specific function and the user's preference.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
994
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
Replies
7
Views
1K
Back
Top