What does
Integrate[f[z], {z, a, b, c, d}]
exactly calculate? Is it
$$\int_a^b f(z)\, \mathrm{d}z +\int_b^c f(z)\, \mathrm{d}z +\int_{c}^d f(z)\, \mathrm{d}z ?$$
That was my first idea but
Integrate[f[z], {z, a, b, a}]
isn't simplified to 0 (even with a FullSimplify
).
For example
Integrate[1/z, {z, 1, I, -1, -I, 1}]
gives as result $2\cdot \pi \cdot i$, which is the value of any closed path around zero.
Which path does it take in the complex plane? Because there has been an Integral, where I thought it would converge, but I got an error with this one.
NIntegrate
. Specifically, it takes the straight line path from $x_i$ to $x_{i+1}$, testing for singularities at the $x_i$. $\endgroup$