# Converting cartesian surface integral to polar

1. Dec 16, 2011

### jbar18

If I have an integral:

$\int\int_{R} x^{2} + y^{2} dy dx$

Where the region R is the area enclosed by a circle centered on the origin of any given radius, is it possible to just convert x^2 + y^2 to r^2 and integrate from 0 to r over dr and 0 to 2 pi over d$\theta$?

So it would become:

$\int^{2\pi}_{0}\int^{r}_{0} r^{2} dr d\theta$

I have seen this done before, but for some reason there was an extra r, with the dr. I'm not sure if this was a mistake or not, but I can't see any reason for it to be there. Unfortunately, when I saw it before the radius of the circular region was 1, and so I could not check through another method, since both gave the same answer. I was also unsure if the r in the boundary should be the same as the r in the integrand. Could somebody explain if there is supposed to be an extra r there, or if anything is wrong with the transformation? So far as I can tell, it is as simple as just replacing x with rcos($\theta$) and y with rsin($\theta$), but the way I saw it done before suggests otherwise.

Thank you for any help.

2. Dec 16, 2011

### obafgkmrns

You are perfectly correct in replacing x by rcos(θ) and y by rsin(θ) in the integrand. The hitch comes in what should be used for the differential element of area. In cartesian coordinates, that"s pretty obviously dxdy. But if you draw a picture of it in a polar system, you will note that the element of area is bit pie shaped, and that for a given dθ, its area is proportional to its distance from the origin. Hence, the polar differential of area is rdrdθ. That's where the extra r comes from.

Also note, that if x and y correspond to some measure having units of say, meters, then the cartesian integral has units of meters squared. Since dθ is unitless, there must be an extra unit of meters coming from somewhere in order for the polar integral to be consistent!

3. Dec 16, 2011

### Rasalhague

The expression you want is

$$\int_0^{2\pi}\int_0^R r^3 \, \mathrm{d}r \, \mathrm{d}\theta = \frac{\pi R^4}{2}$$

where $R$ is the radius of the circle, a constant, and the $r$ in $r^2=x^2+y^2$ is a variable. This gives the same result as the harder-to-compute formulas in Cartesian coordinates, for example

$$\int_{-R}^R\int_{-\sqrt{R^2-x^2}}^{\sqrt{R^2-x^2}}(x^2+y^2)\, \mathrm{d}y \, \mathrm{d}x.$$

In general, to convert an integral from Cartesian to some other coordinate system we need to do three things:

(1) Compose the integrand with the coordinate transformation from "other" to Cartesian. In your example, that means replacing $x^2+y^2$ with $r^2$, since $x=r \cos\theta$ and $y=r \sin\theta$, and

$$r^2\cos^2\theta+r^2\sin^2\theta = r^2(\cos^2\theta+sin^2\theta)=r^2$$.

(2) Multiply the integrand by the appropriate conversion factor (to account for the different ways that area is represented in the different coordinate systems, as obafgkmrns explained), namely the absolute value of the determinant of the Jacobian matrix of the coordinate transformation function from "other" to Cartesian. Think of the transformation as a function $T$ from $\mathbb{R}^2$ to $\mathbb{R}^2$:

$$T( r,\theta ) = ( r\cos\theta,r\sin\theta ).$$

Its Jacobian is the matrix of partial derivatives whose $ij$ entry is the parial derivative of the $i$th component of $T$ with respect to the $j$th input variable. Thus, in this case

$$J=\begin{pmatrix} \frac{\partial (r\cos\theta)}{\partial r} & \frac{\partial (r\cos\theta)}{\partial \theta}\\ \frac{\partial (r \sin\theta)}{\partial r} & \frac{\partial (r \sin\theta)}{\partial \theta} \end{pmatrix}=\begin{pmatrix} \cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta \end{pmatrix},$$

and $\left | \det(J) \right |=r$.

(3) Express the limits of integration in terms of the "other" coordinate system.

The principle is exactly the same for $\mathbb{R}^3$ and higher dimensions. In one dimension, it corresponds to the method of substitution (=reverse chain rule) for a single-variable integral.

Last edited: Dec 16, 2011
4. Dec 16, 2011

### Rasalhague

A footnote.

I hope someone with more expertise will correct me if I'm wrong, but it seems to me that the use, for multivariable integrals, of the absolute value in the "integration by substitution" formula is due to convention, rather than to any inherent distinction between single-variable and multivariable integrals.

When the integrand is a function of one variable, i.e. $f:\mathbb{R}^1 \rightarrow \mathbb{R}^1$, the convention is simply to substitute the old variable for the new in the limits. The sign of the derivative of the coordinate transformation function is necessary to correct for any change in orientation.

But when the integrand is a function of more than one variable, i.e. $f:\mathbb{R}^n \rightarrow \mathbb{R}^1$, with $n\neq 1$, then I guess the convention must be to quietly flip the limits so that the lower limit is always less than the upper limit without multiplying the integrand by -1. If the coordinate transformation changes the orientation, this will introduce an erroneous factor of -1. But in that case, Jacobian determinant will be negative, and taking its absolute value introduces another factor of -1, correcting the first.

For example,

$$\int_0^1\int_0^1(x^3+y)\,\mathrm{d}y \, \mathrm{d}x = \frac{3}{4}.$$

Let $\phi(u,v)=(-u,v)$. Then the Jacobian is

$$\begin{pmatrix} -1 & 0\\ 0 & 1 \end{pmatrix},$$

and its determinant -1.

$$\int_0^{-1}\int_0^1((-u)^3+v)(-1)\, \mathrm{d}v \, \mathrm{d}u = \frac{3}{4}$$

$$=\int_0^{-1}\int_0^1 f \circ \phi(u,v) \cdot \det(J) \, \mathrm{d}v \, \mathrm{d}u$$

$$=-\int_{-1}^0\int_0^1 f \circ \phi(u,v) \cdot \det(J) \, \mathrm{d}v \, \mathrm{d}u$$

$$=\int_{-1}^0\int_0^1 f \circ \phi(u,v) \cdot (-\det(J)) \, \mathrm{d}v \, \mathrm{d}u$$

$$=\int_{-1}^0\int_0^1 f \circ \phi(u,v) \cdot\left | \det(J) \right | \, \mathrm{d}v \, \mathrm{d}u.$$

5. Dec 17, 2011

### fashizzle

yeah you have to add in an extra r; rdθ defines an arc length, dr gives you the radius.