Re: Different results for same integration

*To*: mathgroup at smc.vnet.net*Subject*: [mg73003] Re: Different results for same integration*From*: "ashesh" <ashesh.cb at gmail.com>*Date*: Sun, 28 Jan 2007 01:19:56 -0500 (EST)*References*: <epcoj2$8gh$1@smc.vnet.net><epfafl$dpv$1@smc.vnet.net>

Hi David, Thanks a ton.. that works excellently... Ashesh On Jan 27, 3:45 pm, "David W. Cantrell" <DWCantr... at sigmaxi.net> wrote: > "ashesh" <ashesh... at gmail.com> wrote: > > Hi all, > > > I am trying to do the following two integrations, which are basically > > the same, but with a change of variable. I am getting different results > > from both of them. Hope some one can point out the mistake I am making. > > > a = 19.0; b = 4.0; t = 5.0; > > > Integrate[(a + b)/Sqrt[(a^2 - x^2)*(b^2 - x^2)], {x, b, b + I*t}] > > > Integrate[(1 + b/a)/Sqrt[(1 - y^2)*(1 - (b^2*y^2)/a^2)], {y, 1, (b + > > I*t)/b}] > > > where y = (x/b) > > > The first integration gives: -1.23787 + 1.44831 I > > > while the second one gives: 6.17818 - 5.4757 I > > > The upper limits of the integrations are complex (b + i t) and ((b + i > > t)/b) respectively. > > > The result from the first integration is correct and I have verified it > > analytically.I suggest that you avoid using inexact numbers for a, b and t. The integral > is unstable at its lower limit. (In fact, it mught be luck that your first > integral gave the correct numerical answer.) > > For your second integration, I recommend > > In[9]:= a = 19; b = 4; t = 5; > NIntegrate[(1 + b/a)/Sqrt[(1 - y^2)*(1 - (b^2*y^2)/a^2)], {y, 1, (b + I*t)/b}] > > Out[9]= -1.23787 + 1.44831 I > > David