# Thread: [SOLVED] Surface integrals in curvilinear coordinates

1. ## [SOLVED] Surface integrals in curvilinear coordinates

Calculate the flux of the vector field $\displaystyle \textbf{A}(\rho, \varphi, z) = \left(z \frac{\rho^2-1}{\rho}, 0, 0\right)$ out through the surface of $\displaystyle x^2 +y^2 +(z-2)^2 \leq 4$ (cylinder coordinates).

I've almost solved this problem using the divergence theorem, but I need to calculate the flux through the above sphere when the radius is $\displaystyle \epsilon$ (because of the singularity along the z-axis).

The problem is that I don't know how to get the normal vector. I know it's $\displaystyle |r'_\varphi \times r'_z|$, but I'm not quite sure how to get $\displaystyle r'_\varphi$ and $\displaystyle r'_z$.

Does anyone have a good online resource for some extra reading by the way?

2. Originally Posted by Spec
I've almost solved this problem using the divergence theorem, but I need to calculate the flux through the above sphere when the radius is $\displaystyle \epsilon$ (because of the singularity along the z-axis).
If you really want to use the divergence theorem, the piece of the ball that you have to remove (and calculate the flux through) is almost like a cylinder of radius $\displaystyle \varepsilon$ along the z-axis, with curved top and bottom. Not a sphere with radius $\displaystyle \varepsilon$.

Through the side of a cylinder of radius $\displaystyle \varepsilon$, the flux is easy to compute since the normal vector is $\displaystyle (1,0,0)$ in cylinder coordinates, so that you just need to integrate $\displaystyle z\frac{\rho^2-1}{\rho}$ over the side: $\displaystyle \int_{h_{\rm min}}^{h_{\rm max}}z\frac{\varepsilon^2-1}{\varepsilon}2\pi\varepsilon\, dz$ and, as $\displaystyle \varepsilon$ tends to 0, $\displaystyle h_{\rm min}\to 0$ and $\displaystyle h_{\rm max}\to 2$.

The problem is that the top and bottom sides remain, but you can prove that the flux through them tends to 0 as $\displaystyle \varepsilon$ tends to 0. For that, it suffices to prove that $\displaystyle \vec{A}\cdot\vec{n}$ can be continuously extended at the poles of the sphere (where $\displaystyle \rho=0$), because then the flux is asymptotically equivalent, as $\displaystyle \varepsilon\to 0$, to the value of this function at the pole times the area of the piece of sphere we consider, which converges to 0. To prove the continuous extension, you can show that $\displaystyle \vec{A}\cdot\vec{n}=z\frac{\rho^2-1}{\rho}\cos\theta=z\frac{\rho^2-1}{2}$ where $\displaystyle \theta$ is the latitude (defined in the sphere); this is simple trigonometry if you draw an appropriate sketch.

...In fact, in such a symmetric situation, with such a nice vector field, and a singularity that prevents you to nicely apply the divergence theorem, it seems way simpler to me to directly use the definition of the flux as an integral over the surface.
By the above computation, the scalar product $\displaystyle \vec{A}\cdot\vec{n}$ equals $\displaystyle z\frac{\rho^2-1}{2}=(2+2\sin\theta) \frac{(2\cos\theta)^2-1}{2}$. And you need to integrate this on the sphere. The easiest way is to use spherical coordinates in the sphere: this gives $\displaystyle \int_{-\pi/2}^{\pi/2} (\cdots) 2\pi r^2 \cos\theta d\theta$ where $\displaystyle r=2$ and $\displaystyle \cdots =\vec{A}\cdot\vec{n}$ as expressed above (depending on $\displaystyle \theta$ only). This is because $\displaystyle r^2\cos\theta d\theta d\phi$ is the usual surface element in spherical coordinates.

3. Originally Posted by Spec
The problem is that I don't know how to get the normal vector. I know it's $\displaystyle |r'_\varphi \times r'_z|$, but I'm not quite sure how to get $\displaystyle r'_\varphi$ and $\displaystyle r'_z$.
One way (like I did above) is to draw a sketch (because of the simple geometrical description of the normal vector to the sphere), use trigonometry, and then spherical integration to get the flux.

The other way is to try to stick to cylinder coordinates. In this case, to get $\displaystyle r'_\varphi$ and $\displaystyle r'_z$, you just need to differentiate $\displaystyle r$, which is a parameterization of the sphere, in cylinder coordinates. You have something like: $\displaystyle r(\varphi,z)=\sqrt{4-(z-2)^2}\vec{e}_r+z \vec{e}_z$. However, in differentiating, you must take care that $\displaystyle \vec{e}_r$ depends on $\displaystyle \varphi$: $\displaystyle \frac{d \vec{e}_r}{d\varphi}= \vec{e}_\varphi$.

4. Originally Posted by Laurent
To prove the continuous extension, you can show that $\displaystyle \vec{A}\cdot\vec{n}=z\frac{\rho^2-1}{\rho}\cos\theta=z\frac{\rho^2-1}{2}$ where $\displaystyle \theta$ is the latitude (defined in the sphere); this is simple trigonometry if you draw an appropriate sketch.
Sorry, I don't understand that part. You're mixing both spherical and cylinder coordinates in that expression, so I don't know what to make of it.

5. Originally Posted by Spec
Sorry, I don't understand that part. You're mixing both spherical and cylinder coordinates in that expression, so I don't know what to make of it.
There's no problem with spherical coordinates here, what I did is just introduce an angle $\displaystyle \theta$ which is very convenient for the computation. It happens that this angle is involved in spherical coordinates, but I only use this fact in the last paragraph, not in this one.

Did you understand the equation itself? If not, I'll try soon to draw a sketch (I don't have time right now).

6. I know that the normal vector for the sphere is $\displaystyle (1,0,0)$ (spherical coordinates), but I don't know how to translate that into cylinder coordinates. And no, I don't understand the equation. I do know that $\displaystyle \rho = rsin\theta$, but I'm not quite sure what to do with that.

7. Originally Posted by Spec
I know that the normal vector for the sphere is $\displaystyle (1,0,0)$ (spherical coordinates), but I don't know how to translate that into cylinder coordinates. And no, I don't understand the equation. I do know that $\displaystyle \rho = rsin\theta$, but I'm not quite sure what to do with that.
On the attached picture, the circle is any meridian of the sphere. You see the angle between the normal vector and $\displaystyle \vec{A}$ is $\displaystyle \theta$, and that this angle also satisfies $\displaystyle \cos\theta=\frac{2}{\rho}$ (because 2 is the radius of the circle). Then $\displaystyle \vec{A}\cdot\vec{n}=\|\vec{A}\|\cos\theta$ and you deduce the equation I wrote.

8. Here's how my professor solved it:

Split up the vector field: $\displaystyle \textbf{A} = \textbf{A}_1 + \textbf{A}_2=\left(z\rho,0,0\right)-\left(\frac{z}{\rho},0,0\right)$

$\displaystyle \textbf{A}_1$ can easily be calculated with the divergence theorem and integrated over the sphere: $\displaystyle div\textbf{A}_1 = 2z$, and $\displaystyle \iiint_V div\textbf{A}_1 = \iiint_V 2z dV = \frac{128\pi}{3}$

To determine the flux that $\displaystyle \textbf{A}_2$ gives, first enclose the sphere with a cylinder and use the divergence theorem on the volume you get when you subtract the sphere from the cylinder. Since $\displaystyle div\textbf{A}_2 = 0$, you get:

$\displaystyle \iint_S \textbf{A}_2 \cdot d\textbf{r}+\iint_{S_1} \textbf{A}_2 \cdot d\textbf{r}+\iint_{S_2} \textbf{A}_2 \cdot d\textbf{r}+\iint_{S_3} \textbf{A}_2 \cdot d\textbf{r}=\iiint_V div\textbf{A}_2 dV=0$ where $\displaystyle S_1,\ S_2,\ S_3$ make up the outer surface area of the cylinder, and $\displaystyle S$ is the surface of the sphere.

Both $\displaystyle \iint_{S_1} \textbf{A}_2 \cdot d\textbf{r}$ and $\displaystyle \iint_{S_2} \textbf{A}_2 \cdot d\textbf{r}$ are zero, so we only need to determine $\displaystyle \iint_{S_3} \textbf{A}_2 \cdot d\textbf{r}$, and that is trivial since the normal vector is $\displaystyle (1,0,0)$, so $\displaystyle \iint_{S_3} \textbf{A}_2 \cdot d\textbf{r} = 16\pi$

The above gives $\displaystyle \iint_{S} \textbf{A}_2 \cdot d\textbf{r}=-\iint_{S_3} \textbf{A}_2 \cdot d\textbf{r}=-16\pi$

When you add the flux from the two vector fields you get the total flux which is: $\displaystyle \frac{80\pi}{3}$

9. Originally Posted by Spec
Here's how my professor solved it:
Thanks for writing it down, that's a clever way of doing, with very little computation. I did not think of putting a cylinder outside the sphere; my cylinder was (almost) inside and it made things tougher.

Originally Posted by Spec
When you add the flux from the two vector fields you get the total flux which is: $\displaystyle \frac{80\pi}{3}$
I'm glad to see this is also what I got by computing (or having computed by my calculator) the integral I wrote :

Originally Posted by Laurent
By the above computation, the scalar product $\displaystyle \vec{A}\cdot\vec{n}$ equals $\displaystyle z\frac{\rho^2-1}{2}=(2+2\sin\theta) \frac{(2\cos\theta)^2-1}{2}$. And you need to integrate this on the sphere. The easiest way is to use spherical coordinates in the sphere: this gives $\displaystyle \int_{-\pi/2}^{\pi/2} (\cdots) 2\pi r^2 \cos\theta d\theta$ where $\displaystyle r=2$ and $\displaystyle \cdots =\vec{A}\cdot\vec{n}$ as expressed above (depending on $\displaystyle \theta$ only).