# Help with Coordinate Transformation from Polar Coordinates?

I want to evaluate the integral $$\frac{1}{2\pi} \int_0^{2\pi} \frac{1}{1 - 2r \cos \theta + r^2} d\theta.$$ I thought first to substitute $\cos(\theta)$ for $\frac{1}{2} (e^{i\theta} + e^{-i\theta} )$, reducing the problem to a complex integral over the unit circle, then using the $z = re^{i\theta}$ to change the polar coordinate of $d\theta$ to $dz$. However, I am stuck with the r in the term when I try to change coordinates using $dz = ire^{i\theta} d\theta$. Basically I want to be able to integrate over $dz$ instead of $d\theta$ but for some reason I'm finding it difficult to transform the coordinate planes, due to the lingering polar terms when I try to to make the transformation. Is there some generic method that I can generally use when I'm faced with the problem of making coordinate changes?

• Note that the denominator is $r'^2$, where $r'$ is the distance from the point with polar coordinates $r,\phi$ to $(1,0)$. – joriki Jul 17 '11 at 23:21

Here's a way that one might be "led by the nose" to the correct contour integral.. Looking at the denominator $r^2 - 2r\cos\theta + 1$ as a function of $r$, you can use the quadratic formula to get the roots, given by $$r = \cos(\theta) \pm {1 \over 2}\sqrt{4\cos^2(\theta) - 4}$$ $$= \cos(\theta) \pm {1 \over 2}\sqrt{-4\sin^2(\theta)}$$ $$= \cos(\theta) \pm i \sin(\theta)$$ $$= e^{i\theta}, e^{-i\theta}$$ So your integral is the same as $${1 \over 2\pi} \int_0^{2\pi} {d\theta \over (r - e^{i\theta})(r - e^{-i\theta})}$$ This suggests doing a contour integral over the unit circle, with $z = e^{i\theta}$, ${1 \over z} = e^{-i\theta}$, and $dz = ie^{i\theta}d\theta$, so that $d\theta = {dz \over iz}$. The resulting contour integral is $${1 \over 2\pi i} \int_{|z| = 1}{dz \over z(r - z)(r - {1 \over z})}$$ $$= {1 \over 2\pi i} \int_{|z| = 1}{dz \over (r - z)(rz - 1)}$$ Note this is the same contour integral Didier Piau got, and as he indicated it's a pretty routine application of the residue theorem.

• Thanks @Zarrax. All the explanations were useful, but this was what I was originally trying to understand. – I Love Cake Jul 25 '11 at 0:21

The idea to transform everything as an integral of a function of the complex variable over the unit circle $C$ is a good one. As you wrote, this means you want to use $z=\mathrm{e}^{\mathrm{i}\theta}$, $\mathrm{d}z=\mathrm{i}\mathrm{e}^{\mathrm{i}\theta}\mathrm{d}\theta=\mathrm{i}z\mathrm{d}\theta$, and $2\cos\theta=z+1/z$. Your integral becomes $$\frac1{2\pi\mathrm{i}}\int_Cf(z)\mathrm{d}z,$$ with $$f(z)=\frac1{z(1+r^2-r(z+1/z))}=\frac1{z(1+r^2)-rz^2-r}=\frac1{(r-z)(rz-1)}.$$ The rest is a matter of residues computation: you will want to know the poles of $f$ inside the circle $C$ hence whether $r<1$ or $r>1$ will matter (the case $r=1$ being excluded since the integral then diverges) and, surprise, the result will involve an absolute value sign.

• Would the appoarch be similar for integrals in the form: $$\int_{U}|f(x,y)|^{2}dxdy$$ – Zophikel Jan 24 '18 at 1:42
• @Zophikel Not unless one can turn them into the (line) integral of a holomorphic function, which seems rather unlikely. – Did Jan 24 '18 at 8:14
• How so could you go into detail ? – Zophikel Jan 24 '18 at 16:46
• @Zophikel You seem to be interested in a problem different from the one solved above. Do not be shy and post a full new question, rather than accumulating mysterious comments. – Did Jan 24 '18 at 16:49
• Oh I'm just asking because I'm attacking something similar so I was browsing for examples looking for avenue's of attack in time i'll have to post a new question. – Zophikel Jan 24 '18 at 16:54

Hint: This is related to the Poisson Kernel.

Full Solution: I assume $0<r<1$. Notice that

$$\frac{1-r^2}{1-2r\cos\theta +r^2} = \operatorname{Re}\left(\frac{1+re^{i\theta}}{1-re^{i\theta}}\right)$$ so that

$$\frac{1}{2\pi} \int_0^{2\pi} \frac{1}{1 - 2r \cos \theta + r^2} d\theta=\frac{1}{2\pi(1-r^2)} \operatorname{Re}\left(\int_0^{2\pi} \left(\frac{1+re^{i\theta}}{1-re^{i\theta}}\right)d\theta\right).$$ Making the change of variables $z=re^{i\theta}$, $dz=ire^{i\theta}d\theta$ this becomes

$$\frac{1}{1-r^2}\operatorname{Re}\left(\frac{1}{2\pi i}\int_{C_r}\frac{1+z}{z(1-z)}dz\right)=\frac{1}{1-r^2}$$ where the last equality comes from evaluating the residue at $0$.

Remark: If $r>1$ the same solution will work, but we will pick up a residue at $z=1$ of $-2$ and instead get $$\frac{1}{2\pi} \int_0^{2\pi} \frac{1}{1 - 2r \cos \theta + r^2} d\theta=\frac{1}{r^2-1}$$ as the final answer.

Hope that helps,

• Eric: You cannot be serious about the value of the integral when $r>1$... :-) – Did Jul 17 '11 at 23:49
• @Didier: O no!! I did $1+(-2)=3$ instead of $-1$!! (also more importantly the integrand is always positive...) Thanks for the heads up. – Eric Naslund Jul 18 '11 at 0:07
• @Eric Thanks for your explanation! – I Love Cake Jul 25 '11 at 0:22