Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
2  
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.) –  Daniel Lichtblau Aug 23 '13 at 23:08

2 Answers 2

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$$

share|improve this answer
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.

share|improve this answer
    
This is incorrect, dt is "infinitesimal" while D[z[t],t] is not (in dt = D[z[t], t]), etc... –  Artes Aug 23 '13 at 23:08
    
@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. –  Nasser Aug 23 '13 at 23:14
    
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. –  Artes Aug 23 '13 at 23:17
1  
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. –  Artes Aug 24 '13 at 10:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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