7
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Where did you read about this Integrate syntax? $\endgroup$
    – Szabolcs
    Feb 26, 2013 at 21:59
  • 1
    $\begingroup$ Well it was an example for Nintegrate somewhere ( i think for the Residues but i am not sure). In fact Integrate[1/z, {z,1,I,-1,-I,1}] gives $2\cdot \pi \cdot i$ $\endgroup$ Feb 26, 2013 at 22:02
  • $\begingroup$ @Szabolcs it shows up under the Details section for NIntegrate. Specifically, it takes the straight line path from $x_i$ to $x_{i+1}$, testing for singularities at the $x_i$. $\endgroup$
    – rcollyer
    Feb 26, 2013 at 22:49

1 Answer 1

7
$\begingroup$

This syntax is correct and it does what you were guessing. However, the simplification is done only if you enter a specific function:

Integrate[x^2, {x, a, b, c, a}]

0

In other words, I replaced your symbolic f by x^2. I think it is reasonable to not simplify such integrals unless you know that the path of the integration doesn't enclose (or in 1D, touch) any singularities. But this can't be guaranteed if the function is unspecified.

Edit

The segments between the points in the specification a,b,c... are straight lines if the integral is more than one-dimensional. In case you're interested in more general line integrals (either in the complex plane or otherwise), here ia a related post:

Complex line integral

$\endgroup$
2
  • $\begingroup$ Do you know which way is taken in the complex plane? $\endgroup$ Feb 26, 2013 at 22:37
  • 2
    $\begingroup$ @DominicMichaelis The straight line between them. ListPlot[{Re[#], Im[#]} & /@ Reap[NIntegrate[z, {z, 0, 1 + 2 I, -3 - 2 I}, EvaluationMonitor :> Sow[z]]][[-1, -1]]] $\endgroup$
    – ssch
    Feb 26, 2013 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.