1. Mar 25, 2013

### yungman

I want to integrate around a closed circular path on xy plane around the origin. Say the radius is b. So

$\oint d\vec l$ where $d\vec l=\hat{\phi}b d\phi$

1) If I just use polar( or spherical or even cylindrical) coordinates. R=b and
$$\oint d\vec l\;=\;\hat{\phi}\int_0^{2\pi} b d\phi\;=\;2\pi b$$

2) Using rectangular co where $\hat{\phi}=-\hat x \sin \phi +\hat y \cos \phi$
$$\oint d\vec l\;=\;b\int_0^{2\pi} (-\hat x \sin\phi+\hat y \cos \phi) d\phi\;=\;0$$

What did I do wrong?

2. Mar 25, 2013

### WannabeNewton

This is a common mistake when you are first learning these things so don't worry. What you did wrong was pull out the $\hat\phi$ from the $d\phi$ integral. $\hat\phi$ is not a constant vector like the standard cartesian basis vectors! You can't simply pull out $\hat\phi$ from the $d\phi$ integral because $\hat\phi$ varies as $\phi$ varies. What you did in (2) was the correct way to evaluate integrals in such coordinates. Cheers!

3. Mar 25, 2013

### yungman

Thanks for the pointers. So this means we have to resolve down to a constant vector ( or whatever you call it) that have constant direction. WHICH in our common rectangular, cylindrical and spherical coordinates, we have NO CHOICE but have to transform the vector into x,y,z coordinates no matter what.

4. Mar 25, 2013

### WannabeNewton

Yessiree

5. Mar 25, 2013

Thanks