MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Q: Contour integral



Hi folks,

I have the following question:  I've been reading "Mathematica for
scientists and engineers", and there is an example on how to calculate
numerically a contour integral:

 NContourIntegrate[f_,par:(z_->g_),{t_,a_,b_}]:=
 NIntegrate[Evaluate[(f/.par)D[g,t]],{t,a,b}]

When applying this to a limacon:

NContourIntegrate[1/(z-1/2),z->Exp[I t](2Cos[t]+1),{t,0,2 Pi}]

one gets the right answer:

\!\(3.33066907387546962`*^-16 + 12.5663706143520892`\ I\)

(4pi I)

However, when modifying the numerical integration into an analytic one,
ContourIntegrate[f_,par:(z_->g_),{t_,a_,b_}]:=
 Integrate[Evaluate[(f/.par)D[g,t]],{t,a,b}]

The answer that is obtained is wrong:

2 Pi I

Any ideas ?

cheers,
Patrick.

PS: Please, also reply by mail...




  • Prev by Date: How to change the argument of a function?
  • Next by Date: Re: [Q] How to get rid of {} in lists?
  • Prev by thread: Re: Re: How to change the argument of a function?
  • Next by thread: Re: Q: Contour integral