MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

New to MATLAB?

# Thread Subject: Essential singularities and residue theorem and contour integral?

 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 28 Aug, 2006 22:47:59 Message: 1 of 14 Hi there, Does the residue theorem of contour integral still work when there are essential singularities inside the closed contour? For example, exp(1/z) inside the closed contour |z|=1? Matlab, Mathematica, Maple failed in computing the residue of "exp(1/z)" for me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or 0. Am I right? Thanks -M
 Subject: Essential singularities and residue theorem and contour integral? Date: 29 Aug, 2006 05:59:08 Message: 2 of 14 In article <1156830479.567529.93780@i42g2000cwa.googlegroups.com>, Mike wrote: >Does the residue theorem of contour integral still work when there are >essential singularities inside the closed contour? Do you know the statement of the theorem? Does it say anything about whether the singularities are essential? >For example, exp(1/z) inside the closed contour |z|=1? Matlab, >Mathematica, Maple failed in computing the residue of "exp(1/z)" for >me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or >0. Am I right? Hint: substitute t=1/z in the series expansion for exp(t). Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada
 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 28 Aug, 2006 23:01:09 Message: 3 of 14 Mike wrote: > Hi there, > > Does the residue theorem of contour integral still work when there are > essential singularities inside the closed contour? > > For example, exp(1/z) inside the closed contour |z|=1? Matlab, > Mathematica, Maple failed in computing the residue of "exp(1/z)" for > me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or > 0. Am I right? > > Thanks > > -M It is very strange that I did a numerial contour integral for exp(1/z) on the closed contour |z|=1? In Matlab it is: quad(@(t) exp(1./exp(1i*t)), -pi, pi) The result is 2*pi, But I remember contour integral should be: 2*pi*i*Res[exp(1/z), @z=0], by the residue theorem, assuming it still works here, but then according to the results, Res[exp(1/z), @z=0] should be "-i", which is very strange... Isn't it?
 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 28 Aug, 2006 23:16:02 Message: 4 of 14 Mike wrote: > Mike wrote: > > Hi there, > > > > Does the residue theorem of contour integral still work when there are > > essential singularities inside the closed contour? > > > > For example, exp(1/z) inside the closed contour |z|=1? Matlab, > > Mathematica, Maple failed in computing the residue of "exp(1/z)" for > > me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or > > 0. Am I right? > > > > Thanks > > > > -M > > It is very strange that I did a numerial contour integral for exp(1/z) > on the closed contour |z|=1? > > In Matlab it is: > > quad(@(t) exp(1./exp(1i*t)), -pi, pi) > > The result is 2*pi, > > But I remember contour integral should be: > > 2*pi*i*Res[exp(1/z), @z=0], > > by the residue theorem, assuming it still works here, > > but then according to the results, > > Res[exp(1/z), @z=0] should be "-i", which is very strange... > > Isn't it? Now I did some further experiments: I tried to use numerical integral to experiment my knowledge of contour integral with branches: I was doing the contour integral along the closed circle |z|=1 and the integrand was z^(p), and I chose different p to trial: 1) p=0: K>> quad(@(t) (exp(1i*t)).^(0), -pi, pi) ans =     6.2832 This is strange: the integrand z^(0)=1, which does not has a singularity inside |z|=1 at all, thus the residue = 0. The contour integral should be 0... but it obviously should be 2*pi. That's very strange for me. 2) p=-1: K>> quad(@(t) (exp(1i*t)).^(-1), -pi, pi) ans =   4.0143e-009 This is also strange, the integrand z^(-1) has a residue = 1, the contour integral should be 2*pi*i. But the numerical integration result shows it is 0. Strange! 3) p=2: K>> quad(@(t) (exp(1i*t)).^(2), -pi, pi) ans =   5.4264e-010 The numerical result is 0, this is in accordance with my expectation. 4) p=-2.3: Now it has branches... K>> quad(@(t) (exp(1i*t)).^(-2.3), -pi, pi) ans =    0.7035 - 0.0000i The integrand is z^(-2.3), I don't know how to compute its residue, so I don't know if 0.7035 should be the answer I expected or not... --------------------- I've also done the following tests: K>> quad(@(t) (exp(1i*t)).^(0.5), -pi, pi) ans =    4.0000 - 0.0000i K>> quad(@(t) (exp(1i*t)).^(1.5), -pi, pi) ans =   -1.3333 - 0.0000i K>> quad(@(t) (exp(1i*t)).^(2.5), -pi, pi) ans =    0.8000 + 0.0000i The results look really strange to me. I am guessing that the branch is in the play... but I don't know how does the branch affect my results... Any thoughts? Thanx
 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 28 Aug, 2006 23:20:32 Message: 5 of 14 Robert Israel wrote: > In article <1156830479.567529.93780@i42g2000cwa.googlegroups.com>, > Mike wrote: > > >Does the residue theorem of contour integral still work when there are > >essential singularities inside the closed contour? > > Do you know the statement of the theorem? Does it say anything about > whether the singularities are essential? > No the theorem did not restrict the type of the singularities... > >For example, exp(1/z) inside the closed contour |z|=1? Matlab, > >Mathematica, Maple failed in computing the residue of "exp(1/z)" for > >me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or > >0. Am I right? > > Hint: substitute t=1/z in the series expansion for exp(t). > This gives the residue for exp(1/z) at z=0 to be 1, but I really don't know if it is right or not. There is no way I can check this result up. A numerical integral gives different results than I had expected... I am also aware of the fact that the numerical results from a CAM software may not serve as a complete correct check-up...
 Subject: Essential singularities and residue theorem and contour integral? Date: 29 Aug, 2006 07:05:20 Message: 6 of 14 In article <1156832432.298433.42880@i3g2000cwc.googlegroups.com>, Mike wrote: > >Robert Israel wrote: >> In article <1156830479.567529.93780@i42g2000cwa.googlegroups.com>, >> Mike wrote: >> >> >Does the residue theorem of contour integral still work when there are >> >essential singularities inside the closed contour? >> >> Do you know the statement of the theorem? Does it say anything about >> whether the singularities are essential? >> > >No the theorem did not restrict the type of the singularities... Well, there's your answer then. >> >For example, exp(1/z) inside the closed contour |z|=1? Matlab, >> >Mathematica, Maple failed in computing the residue of "exp(1/z)" for >> >me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or >> >0. Am I right? >> >> Hint: substitute t=1/z in the series expansion for exp(t). >> > >This gives the residue for exp(1/z) at z=0 to be 1, but I really don't >know if it is right or not. Yes, that's right. > There is no way I can check this result up. >A numerical integral gives different results than I had expected... I >am also aware of the fact that the numerical results from a CAM >software may not serve as a complete correct check-up... In Maple: > f:= z -> exp(1/z):   res:= 1/(2*Pi)*Int(f(exp(I*t))*exp(I*t), t=0..2*Pi):   evalf(res);    .9999999995-.7333100980e-17*I Close enough? Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada
 Subject: Essential singularities and residue theorem and contour integral? Date: 29 Aug, 2006 07:08:55 Message: 7 of 14 In article <1156831269.598789.111730@m79g2000cwm.googlegroups.com>, Mike wrote: > >Mike wrote: >> Hi there, >> >> Does the residue theorem of contour integral still work when there are >> essential singularities inside the closed contour? >> >> For example, exp(1/z) inside the closed contour |z|=1? Matlab, >> Mathematica, Maple failed in computing the residue of "exp(1/z)" for >> me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or >> 0. Am I right? >> >> Thanks >> >> -M > >It is very strange that I did a numerial contour integral for exp(1/z) >on the closed contour |z|=1? > >In Matlab it is: > >quad(@(t) exp(1./exp(1i*t)), -pi, pi) > >The result is 2*pi, > >But I remember contour integral should be: > >2*pi*i*Res[exp(1/z), @z=0], > >by the residue theorem, assuming it still works here, > >but then according to the results, > >Res[exp(1/z), @z=0] should be "-i", which is very strange... > Remember you're integrating f(z) dz around the curve. If z = exp(i t), then dz = i exp(i t) dt. You seem to have left out the factor i exp(i t) from the dz. Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada
 Subject: Essential singularities and residue theorem and contour integral? From: Julian V. Noble Date: 29 Aug, 2006 10:00:39 Message: 8 of 14 Mike wrote: > Hi there, > > Does the residue theorem of contour integral still work when there are > essential singularities inside the closed contour? Yes. For example, the integral of exp(1/z) around the unit circle is 2\pi i . > For example, exp(1/z) inside the closed contour |z|=1? Matlab, > Mathematica, Maple failed in computing the residue of "exp(1/z)" for > me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or > 0. Am I right? > > Thanks > > -M > -- Julian V. Noble Professor Emeritus of Physics University of Virginia
 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 29 Aug, 2006 13:56:16 Message: 9 of 14 Robert Israel wrote: > In article <1156832432.298433.42880@i3g2000cwc.googlegroups.com>, > Mike wrote: > > > >Robert Israel wrote: > >> In article <1156830479.567529.93780@i42g2000cwa.googlegroups.com>, > >> Mike wrote: > >> > >> >Does the residue theorem of contour integral still work when there are > >> >essential singularities inside the closed contour? > >> > >> Do you know the statement of the theorem? Does it say anything about > >> whether the singularities are essential? > >> > > > >No the theorem did not restrict the type of the singularities... > > Well, there's your answer then. > What's your answer? > .9999999995-.7333100980e-17*I > > Close enough? > Agreed.
 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 29 Aug, 2006 14:02:52 Message: 10 of 14 Robert Israel wrote: > In article <1156831269.598789.111730@m79g2000cwm.googlegroups.com>, > Mike wrote: > > > >Mike wrote: > >> Hi there, > >> > >> Does the residue theorem of contour integral still work when there are > >> essential singularities inside the closed contour? > >> > >> For example, exp(1/z) inside the closed contour |z|=1? Matlab, > >> Mathematica, Maple failed in computing the residue of "exp(1/z)" for > >> me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or > >> 0. Am I right? > >> > >> Thanks > >> > >> -M > > > >It is very strange that I did a numerial contour integral for exp(1/z) > >on the closed contour |z|=1? > > > >In Matlab it is: > > > >quad(@(t) exp(1./exp(1i*t)), -pi, pi) > > > >The result is 2*pi, > > > >But I remember contour integral should be: > > > >2*pi*i*Res[exp(1/z), @z=0], > > > >by the residue theorem, assuming it still works here, > > > >but then according to the results, > > > >Res[exp(1/z), @z=0] should be "-i", which is very strange... > > > > Remember you're integrating f(z) dz around the curve. > If z = exp(i t), then dz = i exp(i t) dt. You seem to have > left out the factor i exp(i t) from the dz. > > Robert Israel israel@math.ubc.ca > Department of Mathematics http://www.math.ubc.ca/~israel > University of British Columbia Vancouver, BC, Canada Yes you are correct. I made a mistake here. Thanks Robert and thanks everybody. Now my question are solely on the branches: 1) z^(2.5) K>> quad(@(t) (exp(1i*t)).^(2.5)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) ans =   -0.0909 - 0.0000i 2) z^(2.1) K>> quad(@(t) (exp(1i*t)).^(2.1)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) ans =   -0.0317 - 0.0000i 3) z^(-2.1) K>> quad(@(t) (exp(1i*t)).^(-2.1)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) ans =    -0.0894 I don't see a way to find residue at z=0 for z^2.1 and z^(-2.1), but where do the above "pseudo residues" come from? Anybody gives me some enlightening? Thanks a lot!
 Subject: Essential singularities and residue theorem and contour integral? From: The World Wide Wade Date: 29 Aug, 2006 14:08:33 Message: 11 of 14 In article <1156830479.567529.93780@i42g2000cwa.googlegroups.com>,  "Mike" wrote: > Hi there, > > Does the residue theorem of contour integral still work when there are > essential singularities inside the closed contour? Why not look up the residue theorem? > For example, exp(1/z) inside the closed contour |z|=1? Matlab, > Mathematica, Maple failed in computing the residue of "exp(1/z)" for > me. My quick guess of the residues for exp(1/z) at z=0 is either 1 or > 0. Am I right? The residue of exp(1/z) at 0 is by definition the coefficient of 1/z in the Laurent expansion of exp(1/z) about 0. We have exp(1/z) = 1 + 1/z + (1/z)^2/2! + ..., so the residue is 1.
 Subject: Essential singularities and residue theorem and contour integral? From: Robert Israel Date: 29 Aug, 2006 16:00:13 Message: 12 of 14 Mike wrote: > Now my question are solely on the branches: > > 1) z^(2.5) > > K>> quad(@(t) (exp(1i*t)).^(2.5)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) > > ans = > > -0.0909 - 0.0000i ... > I don't see a way to find residue at z=0 for z^2.1 and z^(-2.1), but > where do the above "pseudo residues" come from? There is no such thing as a residue at a branch point. In general, the integral of the function on a contour around the branch point will depend on where you cross the branch cut (as well as on which branch is used). In particular, for f(z) = z^p where p is not an integer, if you integrate the principal branch on the circle C of radius r centred at 0, 1/(2 pi i) int_C f(z) dz         = r^(p+1)/(2 pi) int_{-pi}^pi exp(i t (p+1)) dt         = r^(p+1)/(2 pi (p+1) i) (exp(pi (p+1) i) - exp(-pi (p+1) i))         = r^(p+1)/(pi (p+1)) sin(pi (p+1)) In example #1, with r = 1 and p = 5/2, sin(7 pi/2)/(7 pi/2) = -.09094568174 approximately. Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada
 Subject: Essential singularities and residue theorem and contour integral? From: Mike Date: 29 Aug, 2006 22:04:13 Message: 13 of 14 Robert Israel wrote: > Mike wrote: > > > Now my question are solely on the branches: > > > > 1) z^(2.5) > > > > K>> quad(@(t) (exp(1i*t)).^(2.5)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) > > > > ans = > > > > -0.0909 - 0.0000i > ... > > I don't see a way to find residue at z=0 for z^2.1 and z^(-2.1), but > > where do the above "pseudo residues" come from? > > There is no such thing as a residue at a branch point. In general, the > > integral of the function on a contour around the branch point will > depend on where you cross the branch cut (as well as on which > branch is used). In particular, for f(z) = z^p where p is not an > integer, if you integrate the principal branch on the circle C of > radius r centred at 0, > 1/(2 pi i) int_C f(z) dz > = r^(p+1)/(2 pi) int_{-pi}^pi exp(i t (p+1)) dt > = r^(p+1)/(2 pi (p+1) i) (exp(pi (p+1) i) - exp(-pi (p+1) i)) > = r^(p+1)/(pi (p+1)) sin(pi (p+1)) > > In example #1, with r = 1 and p = 5/2, > sin(7 pi/2)/(7 pi/2) = -.09094568174 approximately. > > Robert Israel israel@math.ubc.ca > Department of Mathematics http://www.math.ubc.ca/~israel > University of British Columbia Vancouver, BC, Canada Thanks a lot Robert. Yes, your argument is very convincing. I've learned a lot from it. However it is surprising to me that you said "there is no residue for branch point", and for negative powers, such as z^(-2.1) etc, the point z=0 is deemed as a branch point but not a singularity? Before you told me this, I thought there are both a branch point and a singularity at z=0 for negative powers for z^p. Now you are saying there is no singularity there? Similar for log(z), you deem z=0 as a branch point or singularity? I've done the numerical contour integration along |z|=1 for log(z) also: K>> quad(@(t) (1i*t)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) ans =   -1.0000 - 0.0000i Any confirmation about the correctness? --------------------------------------------------- If the integrand is complicated with branch points and several other singularities inside the contour, and then I cannot work out the angle integral after we change the z into r*exp(i*t), t from -pi to pi... and also you said there is no residue for branch point so residue theorem does not apply, under such situations how can I calculate the contour integral?
 Subject: Essential singularities and residue theorem and contour integral? Date: 30 Aug, 2006 05:29:17 Message: 14 of 14 In article <1156914253.224777.120900@e3g2000cwe.googlegroups.com>, Mike wrote: >However it is surprising to me that you said "there is no residue for >branch point", and for negative powers, such as z^(-2.1) etc, >the point >z=0 is deemed as a branch point but not a singularity? It is not an _isolated_ singularity, because of the branch cut. >Similar for log(z), you deem z=0 as a branch point or singularity? Branch point. >I've done the numerical contour integration along |z|=1 for log(z) >also: > >K>> quad(@(t) (1i*t)*1i.*exp(1i*t)/2/pi/1i, -pi, pi) > >ans = > > -1.0000 - 0.0000i > >Any confirmation about the correctness? Yes, it's correct. Now try it along |z| = 2. >--------------------------------------------------- > >If the integrand is complicated with branch points and several other >singularities inside the contour, and then I cannot work out the angle >integral after we change the z into r*exp(i*t), t from -pi to >pi... and >also you said there is no residue for branch point so residue theorem >does not apply, under such situations how can I calculate the contour >integral? A standard trick is to integrate along a "keyhole" contour that avoids crossing the branch cut. Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada