12
$\begingroup$

For example, how can I calculate

$$\int_{\left | z \right |=1}\frac{dz}{z}$$

I know that the answer is $2\pi i$ but how do I do it using Mathematica?

$\endgroup$
1
  • 2
    $\begingroup$ Parametrize the range of integration. Then make sure you properly rewrite dz using the chain rule. (@Nasser gave a response with explicit detail in case this is not clear.) $\endgroup$ Commented Aug 23, 2013 at 23:08

2 Answers 2

15
$\begingroup$

If you want to calculate this integral with Mathematica use beautiful (and very powerful!)$\;$ Cauchy Integral Formula implying an adequate theorem of Complex Residue. Thus we have $$\int_{\left | z \right |=1}\frac{dz}{z}= 2\pi i\; Res_{z_{0}=0} f$$ where $f(z)=\frac{1}{z}$.

We can find the residue at $z_0=0$ of $f(z)$ in Mathematica with Residue:

Residue[1/z, {z, 0}]
1

therefore:

$$\int_{\left | z \right |=1}\frac{dz}{z}= 2\pi i$$

$\endgroup$
0
10
$\begingroup$
z = Exp[I t];
dz = D[z, t];
Integrate[(1/z) dz, {t, 0, 2 Pi}]

Mathematica graphics

The idea is to convert it to complex contour integration.

$\endgroup$
4
  • $\begingroup$ This is incorrect, dt is "infinitesimal" while D[z[t],t] is not (in dt = D[z[t], t]), etc... $\endgroup$
    – Artes
    Commented Aug 23, 2013 at 23:08
  • $\begingroup$ @Artes, so I assume you do not want the first way of expression it? i.e. use explicit function? Will remove the function, and keep the expression. no problem. $\endgroup$
    – Nasser
    Commented Aug 23, 2013 at 23:14
  • $\begingroup$ You could write dz = D[z, t] dt but you musn't write dz = D[z, t]. Next Integrate[(1/z) dz, {t, 0, 2 Pi}] doesn't make sense. $\endgroup$
    – Artes
    Commented Aug 23, 2013 at 23:17
  • 1
    $\begingroup$ Now, your approach is more appropriate, unfortunately using this symbol dz it seems to be a differential while it seems you are using it in a different context. You haven't demonstrated seamlessly why you change $\frac{dz}{z}$ to another function using the same symbols. $\endgroup$
    – Artes
    Commented Aug 24, 2013 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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