# Help evaluating a surface integral in polar coordinates

1. Aug 31, 2009

### bitrex

1. The problem statement, all variables and given/known data

I have to evaluate the surface integral of the following function over the top hemisphere of a sphere.

2. Relevant equations
$$\sigma (x,y,z) = \frac{\sigma_0 (x^2+y^2)}{r^2}$$

$$z = \sqrt{r^2-x^2-y^2}$$

$$\iint G[x,y, f(x,y)] \sqrt{1+ \frac{\partial f}{\partial x}+ \frac{\partial f}{\partial y}}dx dy$$

3. The attempt at a solution

$$\frac{\partial f}{\partial x} = \frac{-x}{z}$$
$$\frac{\partial f}{\partial y} = \frac{-y}{z}$$

so

$$\sqrt{1 + \frac{x^2}{z^2} + \frac{y^2}{z^2}} = \frac{r}{z}$$

since $$x^2+y^2+z^2 = r^2$$

So multiplying I get

$$\frac{\sigma_0(x^2+y^2)r}{r^2(r^2-x^2-y^2)^{\frac{1}{2}}}$$

The problem is when I try to convert this into polar coordinates to do the double integral by substituting $$x = r cos \theta, y = r sin \theta$$ the stuff in the lower parenthesis becomes zero which is obviously a problem. Where am I going wrong here? Thanks for any help.

Last edited: Aug 31, 2009
2. Sep 1, 2009

### HallsofIvy

Why are you converting from spherical coordinates to Cartesian coordinates and then back into spherical coordinates? Everything you are given is in spherical coordinates so do the whole problem that way.

Of course, you need to know that the differential of surface area, on a sphere, is $R^2 sin(\phi)drd\theta d\phi$ where R is the (constant) radius of the sphere, $\theta$ is the "longitude" and $\phi$ is the "co-latitude".

(The "stuff in the lower parentheses" does NOT become 0. By your second equation, it is $z^2= r^2- x^2-y^2$.)

3. Sep 1, 2009

### bitrex

I'm sorry if I wasn't clear in my post - the information given for the problem was just the first two equations in section 2 above. They seem to be in Cartesian coordinates, so I'm not sure where I converted from polar to Cartesian and back again? I understand that the term in the denominator equals z^2, but when I try to convert x and y to $$r cos \theta$$ and $$r sin \theta$$ I get $$(r^2-r^2cos^2\theta - r^2sin^2\theta)^{\frac{1}{2}} = (r^2 - r^2(cos^2\theta + sin^2\theta)^{\frac{1}{2}} = 0^{\frac{1}{2}}.$$ I'm afraid I'm not much further enlightened.

Edit: I think I may have found my problem: The first two equations are actually:

$$\sigma (x,y,z) = \frac{\sigma_0 (x^2+y^2)}{R^2}$$

$$z = \sqrt{R^2-x^2-y^2}$$

where R is a _constant_. This is a _different_ R than the r in r cos(x) and r sin(y) that I substitute I believe?

Last edited: Sep 1, 2009
4. Sep 1, 2009

### gabbagabbahey

Are you specifically asked to use plane polar coordinates, or are you allowed to use spherical polar coords?

If you are permitted to do so, I would use the latter as it makes thing mush simpler. In spherical polars,

$x=r\sin\theta\cos\phi$
$y=r\sin\theta\sin\phi$
$z=r\cos\theta$

5. Sep 1, 2009

### bitrex

I have to do this in polar coordinates, unfortunately. At this point I'm not even sure I've set the problem up correctly - if the function to be integrated over the surface is what it is how do I get it in the form of the first part of $$\iint G[x,y, f(x,y)] \sqrt{1+ \frac{\partial f}{\partial x}+ \frac{\partial f}{\partial y}}dx dy$$? How do I deal with the R^2 and get the function in the form G(x,y,f(x,y))? I'm really lost now.

6. Sep 1, 2009

### gabbagabbahey

Why would you want the function to be in the form G(x,y.f(x,y)) if you are going to do the integration in polar coordinates?

Last edited: Sep 1, 2009
7. Sep 2, 2009

### bitrex

My idea was to do the partial differentiations required of the surface function in Cartesian coordinates, multiply by the function G, simplify, and then convert to polar coordinates by substituting for x and y - basically because at this point that's about the only thing I have some idea of how to do.

8. Sep 2, 2009

### gabbagabbahey

Okay, well what is the definition of 'G' that you have in your text/notes?

9. Sep 2, 2009

### bitrex

Well, I assumed that I could take the function I was trying to integrate over the surface, $$\sigma (x,y,z) = \frac{\sigma_0 (x^2+y^2)}{r^2}$$, use that for G, then compute the partial derivatives of the function of the surface under the square root, multiply the mess together and substitute $$r cos\theta$$ and $$r sin \theta$$ and then perform the integration, as I did in my first post. This method doesn't seem to be working out correctly, so I'm assuming now that I'm making a mistake in setting up the equation, but I don't know what that mistake is. Do I have to modify the function I'm using for G somehow, since G has its z coordinate specified as a function of f(x,y) where f(x,y) is the surface function?

Last edited: Sep 2, 2009
10. Sep 3, 2009

### bitrex

Does anyone have any further advice?

11. Sep 3, 2009

### HallsofIvy

I misread this before, thinking "spherical coordinates" (which are easy!) rather than "polar coordinates"

In cylindrical coordinates, the equation of a sphere is $r^2+ z^2= R^2$ and the top hemisphere is given by $z= \sqrt{R^2- r^2}$. You write any point on the hemisphere with the parametric equations $x= r cos(\theta)$, $y= r sin(\theta)$, $z= \sqrt{R^2- r^2}$, with parameters r and $\theta$. That can be written as the vector equation, $\vec{p(r,\theta)}= r cos(\theta)\vec{i}+ r sin(\theta)\vec{j}+ (R^2- r^2)^{1/2}\vec{k}$.

The derivatives, $\vec{p}_r= cos(\theta)\vec{i}+ sin(\theta)\vec{j}- r(R^2- r^2)^{-1/2}\vec{k}$ and $\vec{p_}\theta= -r sin(\theta)\vec{i}+ r cos(\theta)\vec{j}$ are in the tangent plane and their cross product,
$$\left|\begin{array}{ccc}\vec{i} & \vec{j} & \vec{k} \\ cos(\theta) & sin(\theta) & r(R^2- r^2)^{-1/2} \\ -r sin(\theta) & r cos(\theta) & 0 \end{array}\right|= r^2cos(\theta)(R^2- r^2)^{-1/2}\vec{i}+ r^2 sin(\theta)(R^2- r^2)^{-1/2}\vec{j}+ r\vec{k}[/itex], the "fundamental vector product" for the surface, is normal to the surface and its length, [tex]\sqrt{r^4 cos^2(\theta)(R^2- r^2)^{-1}+ r^4 sin^2(\theta)(R^2- r^2)^{-1}+ r^2}= \sqr{\frac{r^4}{R^2- r^2}+ r^2}}$$
$$= \sqrt{\frac{r^4+ r^2R^2- r^4}{R^2- r^2}= \sqrt{\frac{r^2R^2}{R^2- r^2}}= \frac{Rr}{\sqrt{R^2- r^2}}$$
gives the "differential of surface area.
The differential is
$$\frac{Rr dr d\theta}{\sqrt{R^2- r^2}}$$

12. Sep 3, 2009

### bitrex

Thank you, Halls! I think my problem earlier was that I was engaging in a bit of "cargo cult mathematics," that is I wasn't really understanding what the purpose of multiplying the scalar function to be integrated by the square root of the squares of some partial derivatives, etc.
By looking at it from the standpoint of parametrized equations, I can better understand what's going on. By taking the derivative of the parameters we're finding the tangent vectors to the surface for a value of theta and r, and then by taking the magnitude of the cross product we're finding the area of a parallelogram bounded by those tangent vectors. Multiply that by the scalar function and taking the areas of those parallelograms down to infinitesimal size by integrating with respect to r and theta and we can find say the mass of a spherical shell if the scalar function describes its density at a certain point. I'll take another stab at this problem this evening now that I have a better idea of "why things are."

13. Sep 3, 2009

### bitrex

Still, if I try to set up the problem with the differential in the above coordinates, with the function to be integrated over the surface being $$\sigma (x,y,z) = \frac{\sigma_0 (x^2+y^2)}{R^2}$$, the integral I get is $$\iint \frac{\sigma r^3}{R \sqrt{R^2 - r^2}} dr d\theta$$ which seems like a messy integral and I don't see how it's going to evaluate to the correct answer, which is just $$\frac{4 \pi R^2\sigma}{3}$$. Maybe I'd better learn how to do integrals in those spherical coordinates!

Last edited: Sep 3, 2009
14. Sep 3, 2009

### bitrex

If I set things up in spherical coordinates, I believe I get $$\iiint \sigma_0(r^2 cos^2\theta - R^2) sin\phi dr d\theta\ d\phi$$ which still looks pretty frightening to me at this point, but maybe more approachable. Does that look correct?

15. Sep 3, 2009

### gabbagabbahey

You mean $$\iint \frac{\sigma_0 r^3}{R \sqrt{R^2 - r^2}} dr d\theta$$ right?

Start by pulling out the constants, then integrate over $\theta$ (what are your integration limits?) and then use a trig substitution (I recommend using $r=R\sin\phi$) to do the $r$ integration...what do you get?

Try it first in plane/cylindrical polars.

16. Sep 3, 2009

### bitrex

Ok, I can smell blood on this problem, so let's do it.

We've got $$\iint \frac{\sigma_0 r^3}{R \sqrt{R^2 - r^2}} dr d\theta$$. Limits of integration for the top half of the sphere are $$\theta$$ from 0 to 2pi, r from 0 to 1.

Pulling out the constants and integrating with respect to theta, I get $$\frac{2\pi \sigma_0}{R}$$. Put that aside. I'm left with $$\frac{r^3}{\sqrt{R^2-r^2}}$$. Substituting $$r=R\sin\phi$$ I get $$\int \frac{R^3 sin^3 \phi}{\sqrt{R^2 cos^2\phi}} Rcos\phi = R^3\int sin^3\phi d \phi$$. Turning that into $$R^3\int(1-cos^2\phi)sin\phi$$ and making the substitution $$u = cos\phi$$ I get $$R^3(-sin\phi + \frac{sin^3\phi}{3})$$. We've changed the variable from r to phi, so the limits of integration for the top half of the sphere I believe should be between 0 and pi/2. Evaluating the above and multiplying by the constants I set aside at the beginning I get $$R^3(-\frac{2}{3}) * \frac{2\pi \sigma_0}{R} = -\frac{4 \pi \sigma_0 R^2}{3}$$. That's pretty close to what I want, but there's that negative sign. Maybe I should have reversed the limits of integration with respect to phi earlier?

Last edited: Sep 4, 2009
17. Sep 3, 2009

### gabbagabbahey

You mean r goes from 0 to R right?

Errmm....

$$\int (1-\cos^2\phi)\sin\phi d\phi=\int (1-u^2)(-du)=-u+\frac{u^3}{3}=-\cos\phi+\frac{\cos^3\phi}{3}$$

18. Sep 3, 2009

### bitrex

Absolutely!

Yeah, that was dumb. Unfortunately my whole solution falls apart now, as the cosine of pi/2 is 0.

Edit: Oh, wait wait, I think I've got it. Let's see here...

No, don't have it. I thought maybe my limits of integration were incorrect for phi, so I double checked by working out the new limits of integration from $$sin^{-1}\frac{r}{R}$$. It's still from 0 to pi/2.

Last edited: Sep 4, 2009
19. Sep 4, 2009

### gabbagabbahey

Sure, $\cos\frac{\pi}{2}=0$, but $\cos0=$____?

20. Sep 4, 2009

### bitrex

Oh, heh. I should really try to do these earlier in the day. So we've got $$-cos\phi + \frac{cos^3\phi}{3}$$evaluated between 0 and pi/2, which gives us $$0 + \frac{2}{3}$$, and multiplying that by the earlier stuff we do indeed get $$R^3(\frac{2}{3}) * \frac{2\pi \sigma_0}{R} = \frac{4 \pi \sigma_0 R^2}{3}$$. I really need to try to avoid making careless mistakes like using the wrong substitution for u in the integral earlier - would have saved a lot of time! I've successfully completed my first surface integral - thanks so much for persevering through this problem with me!