Exactly. That's what I do quite often with complex line integrals, where one vector is real: a [0,1]-parametrization of the curve, and the other complex: the value of a complex function on the curve. And indeed, this works very well for closed circle integrals in the complex plane, for example returning the residuum of a meromorphic function.
On Friday, April 25, 2014 9:41:13 AM UTC+2, Jason Merrill wrote: > > 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. >