On Thursday, April 24, 2014 11:57:33 PM UTC-7, Tomas Lycken wrote: > > And as soon as you start working with complex analysis, I'm not entirely > sure the trapezoidal rule is valid at all. It might just be because the > article author was lazy, but the Wikipedia article only talks about > integrals of real-valued functions of one (real, scalar) variable. If you > need complex numbers for something more than curiosity about Julia's type > system, you probably want another approach altogether... >
The trapezoid rule is valid in complex analysis, and in fact, it converges exponentially for integrals around a circular contour for functions that are analytic in an annulus containing the contour. Trefethen has a beautiful paper on this subject: https://people.maths.ox.ac.uk/trefethen/trefethen_weideman.pdf This exponential convergence also applies for periodic functions integrated over a full period on the real line, for the same reasons.