what is the differance betwwen two integral mentioned below.

what is the difference between these two
(i) int((i+(2*i/(3*exp(i*t)-2))),0,2*pi)
ans= 2*pi*i a
and
(ii) int((((3*i*exp(i*t)-2*i)+2*i)/(3*exp(i*t)-2)),0,2*pi)
ans = 0 ,
though mathematicaly both are equal.
expression is integral 3*i*exp(i*t)/(3*exp(i*t)-2)) between limit 0 to 2*pi

4 Comments

In a mathematics package from a different vendor, I found that the second integral produced 2*pi*i when the 0 and 2*pi were given as constant limits, but that if the limits were given as symbolic variables and then 0 and 2*pi were substituted in, then the result of the integral was found to be 0. So it isn't just MuPAD that is having difficulty.
Matlab 2012a returns the same with both expressions :
>> syms t
>> int((i+(2*i/(3*exp(i*t)-2))),0,2*pi)
ans =
pi*2*i
>> int((((3*i*exp(i*t)-2*i)+2*i)/(3*exp(i*t)-2)),0,2*pi)
ans =
pi*2*i
The integral has a branch cut at t = Pi it turns out.
You will get the same result if you specifiy the variable with respect to which you are integrating:
syms t
int1 = int((i+(2*i/(3*exp(i*t)-2))),t,0,2*pi)
int1 =
pi*2*i
int2 = int((((3*i*exp(i*t)-2*i)+2*i)/(3*exp(i*t)-2)),t,0,2*pi)
int2 =
pi*2*i
In both R12b and R13b you do get the same results (as above) with and without specifying the integration variable.

Sign in to comment.

Answers (1)

If a numerical integration is carried out on this integral, it will easily be seen that the first answer is correct and the second answer is very wrong! Your 'int' function made a fundamental error here.
The explanation for this is very likely that the 'int' function discovered in the second case that an indefinite integral for this function can be expressed as log(3*exp(i*t)-2), and since its initial value at t = 0 was presumed to be the same as the final value at t = 2*pi, then the definite integral must be zero. The flaw in this reasoning can best be seen in the residue theorem of analytic function theory.
If we substitute z = exp(i*t), this integral is equal to the contour integral of 1/(z-2/3) with respect to z as z moves around counterclockwise from z = 1 in a full unit circle in the complex plane back to the starting point again at z = 1. As is apparent, there is a simple pole first order singularity in the function 1/(z-2/3) at z = 2/3 and this point lies inside that unit circle. By the residue theorem this contour integral has the value 2*pi*i times the coefficient of this pole which in this case is 1, and this agrees with the first answer. If we had traveled around a smaller z circle that doesn't include this singularity, the correct answer would have been zero, but of course that would have required a path for t down below the real line.
Another way of viewing the error is that the function log(3*exp(i*t)-2) as t progresses from t = 0 to t = 2*pi, travels from one of the infinitely many branches of the log function to its next one. That is, if you force the value of log(3*exp(i*t)-2) to vary continuously along its path without making any jumps, it ends up with a different value than it started with, even though t has returned to its initial value. As Walter has pointed out, the log function has a branch cut at the negative real axis - if you plotted its value using matlab's 'log' function, it would take a sudden jump as it crosses the negative real axis. This jump at the branch cut accounts entirely for the error made by 'int' in arriving at the second answer.

Products

Edited:

on 26 Feb 2014

Community Treasure Hunt

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

Start Hunting!