# Thread: Volume Integral - Divergence theorem

1. ## Volume Integral - Divergence theorem

Let S to be the closed surface of the cone given by x^2+y^2<=z^2, where 0<=z<=h
Let n be a unit normal to S, pointing outward from the cone.

I have to evaluate the surface integral (r dot product n dS) where r is the position vector.

I was thinking that I have to consider the curved part of the cone and its flat part.
Now to do the surface interval over the curved area I was intending to integrate using cylindrical polars. If I set r=(Rcosf, Rsinf, z) and ndS = partial derivative of r w.r.t f cross product partial derivative of r w.r.t z. Here is the point I am not sure. Since with cylindrical polars the cone is described using three parameters (R, f, z) so which two parameters do I use for findind ndS?

I may be in a totally wrong path, any help for this would be appreciated!!!

Or maybe integrate the curved surface using cartesian coordiantes by saying z=sqrt(x^2+y^2)?
And then I will just have to integrate over the circle x^2+y^2=h^2, since 0<=z<=h?

2. ## Re: Volume Integral - Divergence theorem

Originally Posted by Darkprince
Let S to be the closed surface of the cone given by x^2+y^2<=z^2, where 0<=z<=h
Let n be a unit normal to S, pointing outward from the cone.

I have to evaluate the surface integral (r dot product n dS) where r is the position vector.

I was thinking that I have to consider the curved part of the cone and its flat part.
Now to do the surface interval over the curved area I was intending to integrate using cylindrical polars. If I set r=(Rcosf, Rsinf, z) and ndS = partial derivative of r w.r.t f cross product partial derivative of r w.r.t z. Here is the point I am not sure. Since with cylindrical polars the cone is described using three parameters (R, f, z) so which two parameters do I use for findind ndS?

I may be in a totally wrong path, any help for this would be appreciated!!!

Or maybe integrate the curved surface using cartesian coordiantes by saying z=sqrt(x^2+y^2)?
And then I will just have to integrate over the circle x^2+y^2=h^2, since 0<=z<=h?
You mention the Divergence theorem in the title but you do not use it! The divergence of the vectorfield $\mathbf{r} = x\vec{i}+y\vec{j}+z\vec{k} \implies \nabla \mathbf{r}=3$

The divergence theorem states that

$\iint_{S}\mathbf{r} \cdot \mathbf{n}dS=\iiint_{V}\nabla \mathbf{r} dV$

So this gives the integral

$\iiint_{V}\nabla \mathbf{r }dV=3\iiint_{V}dV$

The volume of a cone is well known $V=\frac{1}{3}\pi r^2 h$

Since the radius is equal to the height we get

$3\iiint_{V}dV=3\left( \frac{1}{3}\pi (h)^2 \cdot h\right)=\pi h^3$

3. ## Re: Volume Integral - Divergence theorem

Originally Posted by TheEmptySet
You mention the Divergence theorem in the title but you do not use it! The divergence of the vectorfield $\mathbf{r} = x\vec{i}+y\vec{j}+z\vec{k} \implies \nabla \mathbf{r}=3$

The divergence theorem states that

$\iint_{S}\mathbf{r} \cdot \mathbf{n}dS=\iiint_{V}\nabla \mathbf{r} dV$

So this gives the integral

$\iiint_{V}\nabla \mathbf{r }dV=3\iiint_{V}dV$

The volume of a cone is well known $V=\frac{1}{3}\pi r^2 h$

Since the radius is equal to the height we get

$3\iiint_{V}dV=3\left( \frac{1}{3}\pi (h)^2 \cdot h\right)=\pi h^3$
Sorry for not mentioning it I have to do the integral first without the divergence theorem and then with the divergence theorem. Doing it with the divergence theorem is easier, I am just trying to figure out how to do it without the divergence theorem

Thanks for your reply though, any help doing it without the divergence theorem would be much appreciated!

Also if we set r = (x,y, sqrt(x^2+y^2)) nabla dot r wouldn't be equal to 2 instead of 3?

4. ## Re: Volume Integral - Divergence theorem

On the "curved part" of the cone, use cylindrical coordinates so that $x= zcos(\theta)$, $y= zsin(\theta}$, and $z= z$. That is, use "position vector" $\vec{r}(\theta, z)= z cos(\theta)\vec{i}+ z sin(\theta)\vec{j}+ z\vec{k}$. Then $\vec{r}_\theta= -z sin(\theta)\vec{i}+ z cos(\theta)\vec{j}$ and $\vec{r}_z= cos(\theta)\vec{i}+ sin(\theta)\vec{j}+ \vec{k}$. The cross product of those vectors is $z cos(\theta)\vec{i}+ z sin(\theta)\vec{j}- z\vec{k}$ where I have chosen the order of the product to give the "outward pointing normal". Its length, $z\sqrt{2}$ gives the surface integral: $\int_{\theta= 0}^{2\pi}\int_{z= 0}^h \sqrt{2} z dzd\theta$

For the flat surface, that is just $z= h$, $x^2+ y^2\le h^2$, a disk of radius h, and its area is just $\pi h^2$.

By the way, you don't really need to integrate to find the curved surface area of a cone. Given a cone with height h and base radius R, cut it along a straight line from base to vertex. Then "flatten" it. (You can do this- any surface with at least one straight line in the surface through every point- a "developable surface"- can be flattened). That forms part of a disk of radius $\sqrt{R^2+ h^2}$, the "slant height", and area $\pi(R^2+ h^2)$. The circumference of that larger disk would be $2\pi\sqr{R^2+ h^2}$ of course, while the "circumference" of our cone was only $2\pi R$. That is a ratio of $\frac{2\pi R}{2\pi\sqrt{R^2+ h^2}}= \frc{R}{\sqrt{R^2+ h^2}}$. That means that the curved surface area of our cone must be $\frac{R}{\sqrt{R^2+ h^2}}(\pi(R^2+ h^2)= \pi R\sqrt{R^2+ h^2}$. Here, R= h so that is $\pi h\sqrt{2h^2}= \pi\sqrt{2}h^2$.

5. ## Re: Volume Integral - Divergence theorem

Originally Posted by HallsofIvy
On the "curved part" of the cone, use cylindrical coordinates so that $x= zcos(\theta)$, $y= zsin(\theta}$, and $z= z$. That is, use "position vector" $\vec{r}(\theta, z)= z cos(\theta)\vec{i}+ z sin(\theta)\vec{j}+ z\vec{k}$. Then $\vec{r}_\theta= -z sin(\theta)\vec{i}+ z cos(\theta)\vec{j}$ and $\vec{r}_z= cos(\theta)\vec{i}+ sin(\theta)\vec{j}+ \vec{k}$. The cross product of those vectors is $z cos(\theta)\vec{i}+ z sin(\theta)\vec{j}- z\vec{k}$ where I have chosen the order of the product to give the "outward pointing normal". Its length, $z\sqrt{2}$ gives the surface integral: $\int_{\theta= 0}^{2\pi}\int_{z= 0}^h \sqrt{2} z dzd\theta$

For the flat surface, that is just $z= h$, $x^2+ y^2\le h^2$, a disk of radius h, and its area is just $\pi h^2$.

By the way, you don't really need to integrate to find the curved surface area of a cone. Given a cone with height h and base radius R, cut it along a straight line from base to vertex. Then "flatten" it. (You can do this- any surface with at least one straight line in the surface through every point- a "developable surface"- can be flattened). That forms part of a disk of radius $\sqrt{R^2+ h^2}$, the "slant height", and area $\pi(R^2+ h^2)$. The circumference of that larger disk would be $2\pi\sqr{R^2+ h^2}$ of course, while the "circumference" of our cone was only $2\pi R$. That is a ratio of $\frac{2\pi R}{2\pi\sqrt{R^2+ h^2}}= \frc{R}{\sqrt{R^2+ h^2}}$. That means that the curved surface area of our cone must be $\frac{R}{\sqrt{R^2+ h^2}}(\pi(R^2+ h^2)= \pi R\sqrt{R^2+ h^2}$. Here, R= h so that is $\pi h\sqrt{2h^2}= \pi\sqrt{2}h^2$.
Using the cylindrical coordinates you introduce don't I describe a cylinder instead of a cone?
Also adding Pi*sqrt(2) * h^2 [for the curved surface] and Pi*h^2 [for the flat surface] we don't get the answer Pi*(h^3) which is the answer that The Empty Set found using the Divergence theorem.

We know definitely that either doing it using the Divergence theorem or not we should get the same answer!

If you have any idea of what went wrong with the calculation and why we can describe the cone with cylindrical polars in the way you did it I would appreciate it very much Thank you very much!

6. ## Re: Volume Integral - Divergence theorem

Originally Posted by Darkprince
Using the cylindrical coordinates you introduce don't I describe a cylinder instead of a cone?
Also adding Pi*sqrt(2) * h^2 [for the curved surface] and Pi*h^2 [for the flat surface] we don't get the answer Pi*(h^3) which is the answer that The Empty Set found using the Divergence theorem.

We know definitely that either doing it using the Divergence theorem or not we should get the same answer!

If you have any idea of what went wrong with the calculation and why we can describe the cone with cylindrical polars in the way you did it I would appreciate it very much Thank you very much!
We have an integral of the form

$\iint_{S}\mathbf{F}(x,y,z)\cdot d \mathbf{S}$

Since we are using the top half of the cone the surface has the explicit representation

$z=f(x,y)=\sqrt{x^2+y^2}$ and the vector field is $\mathbf{F}(x,y,z)=x\vec{i}+y\vec{j}+z\vec{k}$

The integral can be calculated as

$\iint_{D}\mathbf{F}(x,y,z)\cdot d\mathbf{S}=\iint_{S}\mathbf{F}\cdot \left( \frac{\partial f}{\partial x}\vec{i}+\frac{\partial f}{\partial y}\vec{j}-\vec{k}\right)dA$

Where we are integrating over the projection of the surface into the x-y plane.
Note we also have the negative on k hat because the normal vector in pointing out of the surface. The projection is the circle of radius h in the xy plane.

Plugging in gives the integral

$\iint_{D}(x\vec{i}+y\vec{j}+\sqrt{x^2+y^2}\vec{k}) \cdot \left( \frac{x}{\sqrt{x^2+y^2}}\vec{i} + \frac{y}{\sqrt{x^2+y^2}}\vec{j}-\vec{k}\right)dA=\iint_{D}0 dA=0$

So now we are half way done, we still have the easy top integral left.

On the flat top part of the cone where $z=h$ the normal vector is $\vec{k}$

So the flux integal is

$\iint_{S} (x\vec{i}+y\vec{j}+h\vec{k})\cdot \vec{k}dS=h\int_{0}^{2\pi}\int_{0}^{h}rdrd\theta=h (\pi h^2)=\pi h^3$

So the total flux is $0+\pi h^3=\pi h^3$

7. ## Re: Volume Integral - Divergence theorem

Originally Posted by TheEmptySet
We have an integral of the form

$\iint_{S}\mathbf{F}(x,y,z)\cdot d \mathbf{S}$

Since we are using the top half of the cone the surface has the explicit representation

$z=f(x,y)=\sqrt{x^2+y^2}$ and the vector field is $\mathbf{F}(x,y,z)=x\vec{i}+y\vec{j}+z\vec{k}$

The integral can be calculated as

$\iint_{D}\mathbf{F}(x,y,z)\cdot d\mathbf{S}=\iint_{S}\mathbf{F}\cdot \left( \frac{\partial f}{\partial x}\vec{i}+\frac{\partial f}{\partial y}\vec{j}-\vec{k}\right)dA$

Where we are integrating over the projection of the surface into the x-y plane.
Note we also have the negative on k hat because the normal vector in pointing out of the surface. The projection is the circle of radius h in the xy plane.

Plugging in gives the integral

$\iint_{D}(x\vec{i}+y\vec{j}+\sqrt{x^2+y^2}\vec{k}) \cdot \left( \frac{x}{\sqrt{x^2+y^2}}\vec{i} + \frac{y}{\sqrt{x^2+y^2}}\vec{j}-\vec{k}\right)dA=\iint_{D}0 dA=0$

So now we are half way done, we still have the easy top integral left.

On the flat top part of the cone where $z=h$ the normal vector is $\vec{k}$

So the flux integal is

$\iint_{S} (x\vec{i}+y\vec{j}+h\vec{k})\cdot \vec{k}dS=h\int_{0}^{2\pi}\int_{0}^{h}rdrd\theta=h (\pi h^2)=\pi h^3$

So the total flux is $0+\pi h^3=\pi h^3$

So how can it be that we find the surface integral over the curved surface zero? Isn't it a very strange thing? How did Halls of Ivy found it non-zero? This is the point I am most confused right now.

Is it ok to evaluate the surface integral using in the beginning cartesian coordinates, then finding ndS by the cross product of r w.r.t x and r w.r.t y? Where r would be my position vector (x,y,sqrt(x^2+y^2)) Then ndS would be the (result of the cross product)dxdy [I should choose the one with negative k since we need the outward normal] and then I should try to integrate over the disc using plane polar coordinates, using Rsinf, Rcosf, z and taking in account also the Jacobian. I think I was doing that yesterday and I found zero also!

The second question is what limits should I take when integrating using the divergence theorem? You assumed that the volume of the cone is known, but if we assume I have to do it from scratch how do I proceed with the limits? And btw why you found nabla dot r = 3? You assumed that r=(x,y,z) and you found nabla=3, shouldn't I assume that r=(x,y,sqrt(x^2+y^2)) and then finding nabla=2?

Thank you very much again for your time, I really appreciate your help!

8. ## Re: Volume Integral - Divergence theorem

Originally Posted by Darkprince
So how can it be that we find the surface integral over the curved surface zero? Isn't it a very strange thing? How did Halls of Ivy found it non-zero? This is the point I am most confused right now.

Is it ok to evaluate the surface integral using in the beginning cartesian coordinates, then finding ndS by the cross product of r w.r.t x and r w.r.t y? Where r would be my position vector (x,y,sqrt(x^2+y^2)) Then ndS would be the (result of the cross product)dxdy [I should choose the one with negative k since we need the outward normal] and then I should try to integrate over the disc using plane polar coordinates, using Rsinf, Rcosf, z and taking in account also the Jacobian. I think I was doing that yesterday and I found zero also!

The second question is what limits should I take when integrating using the divergence theorem? You assumed that the volume of the cone is known, but if we assume I have to do it from scratch how do I proceed with the limits? And btw why you found nabla dot r = 3? You assumed that r=(x,y,z) and you found nabla=3, shouldn't I assume that r=(x,y,sqrt(x^2+y^2)) and then finding nabla=2?

Thank you very much again for your time, I really appreciate your help!
For you first question the integral in coordinate indpendant. The value will not change whatever coordinates you use. P.S that is excactly what I did. When you have an explicit function we can always use the trivial parameterization, that is,

$x=x, y=y, z=f(x,y)$ so the surface is given by $\mathbf{s}(x,y)=x\vec{i}+y\vec{j}+f(x,y)\vec{k}$

Now taking the partial derivatives gives

$s_x=\vec{i}+\frac{\partial f}{\partial x}\vec{k}, s_y=\vec{j}+\frac{\partial f}{\partial y}\vec{k}$

Now if we cross the above two you get

$s_x \times s_y=-\frac{\partial f}{\partial x}\vec{i}-\frac{\partial f}{\partial y}\vec{j}+\vec{k}$ we can use the negative of this vector as well.

So in general any flux integral with an explicit surface can be calculated by the formula

$\iint_V \mathbf{F}\cdot d\mathbf{S}=\iint_{D} \mathbf{F}\cdot \left(-\frac{\partial f}{\partial x}\vec{i}-\frac{\partial f}{\partial y}\vec{j}+\vec{k} \right)dA$

For the 2nd question calculate the diverges in cartiesian coordinates and you will get the integral

$\iiint_{V}dV$ where the volume is the cone, now change to cylindircal coordinates to get

$\iiint_{V}dV=\int_{0}^{h}\int_{0}^{2\pi} \int_{0}^{h} rdrd\theta dz$

9. ## Re: Volume Integral - Divergence theorem

Regarding the volume of the cone. If I set x=ucosv, y= usinv and z=u (which is the parametric description of cone), where 0<=u<=h, 0<=v<=2Pi and 0<=z<=h then the Jacobian = partial derivative (x,y,z) / partial derivative (u,v,z) leads to a matrix with zero determinant. The matrix I find is [cosv, -usinv, o ; sinv, ucosv, 0 ; 0 0 1]
What is it going wrong? Using my notation and your result, I should have found the Jacobian as u!

10. ## Re: Volume Integral - Divergence theorem

Originally Posted by Darkprince
Regarding the volume of the cone. If I set x=ucosv, y= usinv and z=u (which is the parametric description of cone), where 0<=u<=h, 0<=v<=2Pi and 0<=z<=h then the Jacobian = partial derivative (x,y,z) / partial derivative (u,v,z) leads to a matrix with zero determinant. The matrix I find is [cosv, -usinv, o ; sinv, ucosv, 0 ; 0 0 1]
What is it going wrong? Using my notation and your result, I should have found the Jacobian as u!
You should have z=z. It takes three parameters to make a solid 3-D object

The parameterization should be

$x=u\cos v, y=u\sin v , z=z$

Now the jacobian is

$\frac{\partial (x,y,z)}{\partial (u,v,z)}=\begin{vmatrix} \cos v & \sin(v) & 0 \\ -u\sin v & u \cos v & 0 \\ 0 & 0 & 1\end{vmatrix}=u\cos^2 v +u \sin^2 v =u$

11. ## Re: Volume Integral - Divergence theorem

That's true, thank you very much! This exercise took me some time to fully understand it, thank you very much!!! Appreciate the time you devoted!

12. ## Re: Volume Integral - Divergence theorem

TES sorry again for bother you, one final question You said that I should parametrize the cone as x=ucosv, y=usinv and z=z to find the Jacobian. Firstly, the equation of a cone is x^2+y^2 = z^2, but if I take x^2 + y^2 with the above parametrization I get u^2, and z=z not u.

Secondly, I found a different matrix for the Jacobian than you, namely [cosv, -usinv, 0 ; sinv, ucosv, 0; 0 0 1] where the ; is between each row (not column) of my matrix. In the matrix above you wrote my rows as your columns.

Thanks again!

13. ## Re: Volume Integral - Divergence theorem

Originally Posted by Darkprince
TES sorry again for bother you, one final question You said that I should parametrize the cone as x=ucosv, y=usinv and z=z to find the Jacobian. Firstly, the equation of a cone is x^2+y^2 = z^2, but if I take x^2 + y^2 with the above parametrization I get u^2, and z=z not u.

Secondly, I found a different matrix for the Jacobian than you, namely [cosv, -usinv, 0 ; sinv, ucosv, 0; 0 0 1] where the ; is between each row (not column) of my matrix. In the matrix above you wrote my rows as your columns.

Thanks again!
You are confusing the 2D surface of the cone with the parameterization of the 3D object the sold volume of the cone. If you constrain z as you have done the inside will be empty!

A 2D analogy would be parameterizing a circle vs a disk. With only one free parameter Theta a circle can be parameterized as

$x=r\cos(\theta), y=r\sin(\theta)$

But now if you also let r vary you will fill in the disk.

For your 2nd question The determinant of a matrix and its transpose are equal. You will get the same value!!

I hope this clears it up.

14. ## Re: Volume Integral - Divergence theorem

So by setting z=z I vary z so I "fill" the cone and I get the volume! Right? I think I got it this time!

15. ## Re: Volume Integral - Divergence theorem

And btw how did you assign the vectorfield (x,y,z) to the cone when using the Divergence theorem?
Was there a criterion for choosing a particular vectorfield, since we were not given one? Thank you again!!!

Page 1 of 2 12 Last