# Thread: Cartesian -> Spherical polar

1. ## Cartesian -> Spherical polar

I have an integral $\displaystyle \int \int_S x^2 + yz \ dS$

and wish to transform to spherical polar coordinates. How does dS become

$\displaystyle dS = r^2 \sin \theta d\theta d\phi$??

Where surface S is $\displaystyle x^2 + y^2 + z^2 = 1$

2. Maybe this will help:

Spherical coordinate system - Wikipedia, the free encyclopedia

Scroll down to where it says:"Integration and differentiation in spherical coordinates"

3. I've seen that page, but how is $\displaystyle dS = r^2 \sin \theta d\theta d\phi$ arrived at?

4. Ok I think I got it, but lets see if you can follow me here. You know how polar coordinates work right?

Where: $\displaystyle ds = rdrd\theta$

5. Originally Posted by eXist
Ok I think I got it, but lets see if you can follow me here. You know how polar coordinates work right?

Where: $\displaystyle ds = rdrd\theta$
I'm afraid I don't follow that...

6. eXist is referring to two dimensional polar coordinates. I admit I don't see what that has to do with your question!

You asked this same question on "Physics Forums" and I answered it there- but here goes again:

There are two ways of looking at this.

First, a rather rough "geometrical" look. Imagine an infinitesmal "rectangle" on the sphere having "top" at $\displaystyle \phi$ and "bottom" at $\displaystyle \phi+ d\phi$, "left" at $\displaystyle \theta$ and "right" at $\displaystyle \theta+ d\theta$. The left and right, "lines of longitude", are great circles, with radius the radius of the sphere, 1. The length of those two sides is $\displaystyle 1(d\phi)= d\phi$. The top and bottom, "lines of latitude", are not great circles. Their centers lie on the line through the poles, (0,0,1) and (0,0,-1). Given a point on one of those circles, drop a perpendicular to that vertical line. You have a right triangle with one leg being the radius of the circle, r, the hypotenuse the radius of the circle, 1, and angle at the center $\displaystyle \phi$. Then $\displaystyle r/1= sin(\phi)$ so the radius of the circle is $\displaystyle sin(\phi)$ and the length of the arc on the sphere is $\displaystyle sin(\phi)d\theta$. The area of the "rectangle" is (width times height) $\displaystyle sin(\phi)d\theta d\phi$.

A more rigorous calculation involves the "fundamental vector product" which is worth knowing on its own. Any smooth surface, since a surface is two dimensional, can be written in terms of two parameters: x= f(u,v), y= g(u,v), z= h(u,v) which can also be written as the vector equation: $\displaystyle \vec{r}= f(u,v)\vec{i}+ g(u,v)\vec{j}+ h(u,v)\vec{k}$. The derivatives of that with respect to the two variables, $\displaystyle \vec{r_u}= f_u(u,v)\vec{i}+ g_u(u,v)\vec{j}+ h_u(u,v)\vec{k}$ and $\displaystyle \vec{r_v}= f_v(u,v)\vec{i}+ g_v(u,v)\vec{j}+ h_v(u,v)\vec{k}$ are vectors in the tangent plane to the surface at each point. The cross product then, $\displaystyle \vec{r_u}\times\vec{r_v}$, the "fundamental vector product", is perpendicular to the surface and, because of the derivatives, its length measures the area of an infinitesmal region: $\displaystyle dS= \left|\vec{r_u}\times\vec{r_v}\right|dudv$.

The spherical coordinates are connected to the cartesian coordinates by $\displaystyle x= \rho cos(\theta)sin(\phi)$, $\displaystyle y= \rho sin(\theta)sin(\phi)$, $\displaystyle z= \rho cos(\phi)$ and we can take those as parametric coordinates for the unit sphere by taking $\displaystyle \rho= 1$: $\displaystyle x= cos(\theta)sin(\phi)$, $\displaystyle y= sin(\theta)sin(\phi)$, $\displaystyle z= cos(\phi)$ or $\displaystyle \vec{r}= cos(\theta)sin(\phi)\vec{i}+ sin(\theta)sin(\phi)\vec{j}+ cos(\phi)\vec{k}$. The derivatives are $\displaystyle \vec{r_\theta}= -sin(\theta)sin(\phi)\vec{i}+ cos(\theta)sin(\phi)\vec{j}$ and $\displaystyle \vec{r_\phi}= cos(\theta)cos(\phi)\vec{i}+ sin(\theta)cos(\phi)\vec{j}- sin(\phi)\vec{k}$. The cross product of those is $\displaystyle cos(\theta)sin^2(\phi)\vec{i}+ sin(\theta)sin^2(\phi)\vec{j}+ sin(\phi)cos(\phi)\vec{k}$ which has length $\displaystyle \sqrt{cos^2(\theta)sin^4(\phi)+ sin^2(\theta)sin^4(\phi)+ sin^2(\phi)cos^2(\phi)}$$\displaystyle = \sqrt{sin^4(\phi)+ sin^2(\phi)cos^2(\phi)}$$\displaystyle = \sqrt{sin^2(\phi)(sin^2(\phi)+ cos^2(\phi))}$$\displaystyle = sin(\phi)$. That gives $\displaystyle dS= sin(\phi)d\phi d\theta$.

By the way, my $\displaystyle \theta$ and $\displaystyle \phi$ are reversed from yours. Mathematics notation (mine) uses $\displaystyle \theta$ as "longitude" and $\displaystyle \phi$ as "co-latitude". Engineering notation reverses those.

7. Thanks for taking the time to write that explanation, it helps to clarify things!

For anyone who finds this post later, there are a couple of nice diagrams which illustrate HallsofIvy's post:
http://www.netcomuk.co.uk/~jenolive/polar.html

8. Originally Posted by HallsofIvy
By the way, my $\displaystyle \theta$ and $\displaystyle \phi$ are reversed from yours. Mathematics notation (mine) uses $\displaystyle \theta$ as "longitude" and $\displaystyle \phi$ as "co-latitude". Engineering notation reverses those.
And physicists and mathematicians in the UK. I'm not really sure why the difference in convensions!