# Change of Variables - Polar to Cartesian

A change of variables from Cartesian to Polar gives

$$\iint_{D}\,dx\,dy=\iint_{D^*}\,r\,dr\,d\theta.$$

I'm trying to change from Polar to Cartesian.

Since $$r=\frac{x}{\cos\theta};\,\, r=\frac{y}{\sin\theta};\,\,\theta=\arccos(\frac{x}{r});\,\,\theta=\arcsin(\frac{y}{r}),$$

we have, $$\frac{\partial r}{\partial x}=\frac{1}{\cos\theta}=\frac{r}{x};\,\, \frac{\partial r}{\partial y}=\frac{1}{\sin\theta}=\frac{r}{y};\,\,\frac{\partial \theta}{\partial x}=-\frac{1}{y};\,\,\frac{\partial \theta}{\partial y}=\frac{1}{x}.$$

So, the determinant of the Jacobian = $\frac{\partial r}{\partial x}\frac{\partial \theta}{\partial y}-\frac{\partial r}{\partial y}\frac{\partial \theta}{\partial x}=\frac{r}{x^2}+\frac{r}{y^2}.$ Then

$$\iint_{D^*}\,r\,dr\,d\theta=\iint_{D}\,r\,\left(\frac{r}{x^2}+\frac{r}{y^2}\right)\,dx\,dy.$$

I expected to get $\iint_{D}\,dx\,dy$ but I'm not. Did I mess up on the calculations or am I missing some steps?

• Since $r^2=x^2+y^2$, this looks OK. Dec 16 '13 at 19:23
• @GiuseppeNegro But $r^2\left(\frac{1}{x^2}+\frac{1}{y^2}\right)\neq 1$ Dec 16 '13 at 19:26
• Oh my, you are right. Must be a computational error, though. Let me check Dec 16 '13 at 19:31
• If I understand correctly, the core of you computation is the evaluation of the Jacobian determinant $$\det \frac{\partial (r, \theta)}{\partial(x, y)}.$$ Your result is wrong, of course. I would proceed as follows: since $\det \frac{\partial (r, \theta)}{\partial(x, y)}=\left( \det \frac{\partial (x,y)}{\partial(r,\theta)}\right)^{-1}$, we can compute the latter and it is easier: the result is $r$. So $$\det \frac{\partial (r, \theta)}{\partial(x, y)}=\frac{1}{r}=\frac{1}{\sqrt{x^2+y^2}}.$$ Dec 16 '13 at 19:40
• @GiuseppeNegro You're right about using the reciprocal of the Jacobian. However, I was trying to find out where I went wrong in the calculation.. Dec 16 '13 at 19:46

Your definitions of $r$ at the beginning are getting you into trouble. Bad things happen at $\sin \theta = 0$ or $\cos \theta = 0$.

Try $r = \sqrt{x^2+y^2}$. Then

$$\frac{\partial{r}}{\partial{x}} = \frac{x}{r}; \frac{\partial{r}}{\partial{y}} = \frac{y}{r}.$$

Then, using Fantini's $\theta = \tan ^{-1}(\frac{y}{x})$, we get

$$\frac{\partial \theta}{\partial x} = \frac{-\frac{y}{x^2}}{1+\frac{y^2}{x^2}} = -\frac{y}{r^2}; \frac{\partial \theta}{\partial y} = \frac{\frac{1}{x}}{1+\frac{y^2}{x^2}} = \frac{x}{r^2}.$$

Then the determinant of your Jacobian $J$ is

$$\frac{\partial r}{\partial x} \frac{\partial \theta}{\partial y} - \frac{\partial r}{\partial y} \frac{\partial \theta}{\partial x} = \frac{x}{r}\left(\frac{x}{r^2}\right) - \frac{y}{r}\left(-\frac{y}{r^2}\right) = \frac{1}{r},$$ which is what you need:

$$dA = J r dr d\theta = \frac{1}{r} r dx dy = dx dy.$$

• I'm still getting $\frac{2}{r}$ for the det of the Jacobian. What else is wrong? Dec 16 '13 at 20:05
• @EggHead What are you getting for $\partial \theta/\partial x$ and $\partial \theta/\partial y$? You should be getting $-y/r^2$ and $x/r^2$, respectively. Dec 16 '13 at 20:14
• You may also want to note that $$\theta = \arctan \left( \frac{y}{x} \right).$$ Dec 16 '13 at 20:34
• @Avi Combining Fantini's and John's suggestion works... Dec 16 '13 at 20:55

You've forgotten about the chain rule in calculating the Jacobian. For instance: $$\frac{\partial r}{\partial x} = \frac{1}{\cos\theta} + \frac{x\sin\theta}{\cos^2\!\theta}\frac{\partial \theta}{\partial x} = \frac{1}{\cos\theta}\left[ 1 + \frac{\partial}{\partial x}\left(\arccos\left(\frac{x}{\sqrt{x^2+y^2}}\right)\right)\right].$$ However, I'd highly encourage you to go the route suggested by John in his answer. Otherwise, as you've already seen, you'll end up banging your head against the wall trying to find calculation mistake after calculation mistake.

• I had computed $-\frac{1}{y} \,and\, \frac{1}{x}$ for $\frac{d\theta}{dx} \,and\, \frac{d\theta}{dy}$ respectively. Using that and John's answer, i got $\frac{2}{r}$ for the determinant, not $\frac{1}{r}$ as expected... Dec 16 '13 at 20:45
• OK, now I'm trying to figure out the rest of it, because @EggHead you're right: I get $2/r$ using your values for the partials wrt $\theta$.
– John
Dec 16 '13 at 22:47
• @John Using Fantini's suggestion of $\theta=arctan(\frac{y}{x})$ works. Using $\theta=arccos(\frac{x}{r})$ and $\theta=arcsin(\frac{y}{r})$ does not. I'm not sure why... Dec 16 '13 at 22:58
• @EggHead Using your definitions of $\theta$ definitely works. Dec 16 '13 at 22:59
• @Avi Using my definitions, John got $\frac{2}{r}$ which does not work. Could you show me the calculations? Thx! Dec 16 '13 at 23:05