# Calculating line integral using Stokes' and Gauss' theorems

#### estro

Hi,

I'm trying to calculate some line integral with both Gauss' and Stokes' theorems, but for some strange reasons I get different results. Since the solution with Stokes' theorem seems to be somewhat easy I doubt that this question was meant to be solved by Gauss' theorem but I still want to try.

Setting the stage:
Let C be a curve which is the intersection of a ball $x^2+y^2+z^2=a^2$ and a plain $x-y+z=0$.
F is a vector field defined by: $\mathbf{F} = (y-2z,x-z,2x-y)$.
The "wanted" line integral is: $\int_C \mathbf{F} \centerdot d \mathbf{x}$ [the orientation doesn't matter since I only interested in absolute numerical value.].

As the intersecting plane has the origin in it and since the center of the ball is the origin as well we can conclude that the plain slices the ball into 2 equal pieces and the curve cuts the ball surface into 2 surfaces with equal area. I will denote S for the whole surface of the ball and S1, S2 for its 2 equal halfes. I will denote the flat surface between the 2 half of the ball with H.
I calculate and get $\nabla \times \mathbf{F}=(0,-4,0)$

Calculation using Stokes' theorem:
$\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{H} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds = \iint_{H} (0,-4,0) \centerdot \frac{(1,-1,1)}{\sqrt{3}}ds= \frac {4} {\sqrt{3}} \iint_{H}ds= \frac {4} {\sqrt{3}} \pi a^2$
The last surface integral is exactly the surface of H which is a surface of a cycle with a radius of 'a' and this explains the last transition at the above equation.
To conclude:
$\int_C \mathbf{F} \centerdot d \mathbf{x} = \frac{4} {\sqrt{3}} \pi a^2$

Calculating using the Gauss' theorem:
Since Stokes' theorem states that only the boundary of the a surface plays the role I can conclude that:
$\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_1} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$ and $\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_S} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$, and since both share the boundary:
$2\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_1} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds + \iint_{S_2} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds=\iint_{S} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$
And I apply the Gauss' theorem:
$\iint_{S} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds=\iint_{S} (0,-4,0) \centerdot \mathbf{n} ds=\iiint_{x^2+y^2+z^2\leq a^2} \nabla \centerdot (0,-4,0)dxdydz=0$

So I get a different answer which means somewhere I did a mistake however I checked myself a million times and I'm sure I did not commit computational mistake and my mistake must be conceptual.

I will appreciate help, thanks in advance.

EDIT: I just fixed many errors and typos I found in my question... [Thanks to Fractal20 for spotting one of them.]

Last edited:
Related Calculus and Beyond Homework News on Phys.org

#### Fractal20

Not that this changes your answers qualitatively but I got del cross F to be (0, -2, 0). Or am I wrong? I will keep looking through the rest now.

#### estro

Not that this changes your answers qualitatively but I got del cross F to be (0, -2, 0). Or am I wrong? I will keep looking through the rest now.
You're right, I made a mistake copying the vector field into the forum. [Will fix in a minute.]
However indeed it is not much of a difference to the question's core.

#### Fractal20

Hopefully I'm not embarrassing myself here. But I'm unsure about your last line. So it seems like you say that Del cross F is some vector function, let's call it g. And so then you have g dot n. Then you apply Gauss's and get Del dot g. Is that right? I just think it's strange because del dot (del cross v) is the divergence of a curl which is always 0. So I think there is something wrong with that step, or else every such problem would be 0.

#### LCKurtz

Homework Helper
Gold Member
Of course, orientation of the surface makes a difference. And you have to choose whether the bounded surface is the top or bottom surface, not both. If, for example, the surface is oriented outwards, you would traverse the bounding curve in opposite directions for the two halves.

#### estro

Hopefully I'm not embarrassing myself here.
...

...
But I'm unsure about your last line. So it seems like you say that Del cross F is some vector function, let's call it g. And so then you have g dot n. Then you apply Gauss's and get Del dot g. Is that right?
...
Exactly.

...
I just think it's strange because del dot (del cross v) is the divergence of a curl which is always 0. So I think there is something wrong with that step, or else every such problem would be 0.
My intuition points to this exact place as well, however I'm not sure, since it seems that the "formal work" was done "decently enough". [only "decently enough" because LCKurtz pointed out the blunder I made with the orientation, but even this blunder can't explain my problem.]

Of course, orientation of the surface makes a difference. And you have to choose whether the bounded surface is the top or bottom surface, not both. If, for example, the surface is oriented outwards, you would traverse the bounding curve in opposite directions for the two halves.
$\mathbf{n}$ is an outwards normal vector.
If I understand your point then yes, I forgot to flip the normal for the 2nd surface integral however even after flipping the normal vector the final answer remains 0.

PS. I only need the numerical value of the line integral so the curve's orientation is not important.

Last edited:

#### LCKurtz

Homework Helper
Gold Member
Calculating using the Gauss' theorem:
Since Stokes' theorem states that only the boundary of the a surface plays the role I can conclude that:
$\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_1} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$ and $\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_S} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$, and since both share the boundary:
$2\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_1} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds + \iint_{S_2} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds=\iint_{S} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$
This is not correct. If $S_1$ is the "top" of the sphere so that$$\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_1} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$$ then for the bottom of the sphere $S_2$$$-\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_2} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$$because you must traverse the curve the other way to preserve the orientation. If you add these two equations you will get 0, which agrees with the the Gauss divergence theorem since the divergence of a curl is 0. Also note that the integral over the whole sphere has nothing in particular to do with the actual value of the line integral.

Last edited:

#### LCKurtz

Homework Helper
Gold Member
This is not correct. If $S_1$ is the "top" of the sphere so that$$\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_1} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$$ then for the bottom of the sphere $S_2$$$-\int_C \mathbf{F} \centerdot d \mathbf{x} = \iint_{S_2} (\nabla \times \mathbf{F}) \centerdot \mathbf{n} ds$$because you must traverse the curve the other way to preserve the orientation. If you add these two equations you will get 0, which agrees with the the Gauss divergence theorem since the divergence of a curl is 0. Also note that the integral over the whole sphere has nothing in particular to do with the actual value of the line integral.
This is exactly what I don't get, how is that I get:

$2\int_C \mathbf{F} \centerdot d \mathbf{x}=\iint_{S_2} (\nabla \times \mathbf{F}) \centerdot \mathbf{n}-\iint_{S_2} (\nabla \times \mathbf{F}) \centerdot \mathbf{n}=0$
Which implies: $\int_C \mathbf{F} \centerdot d \mathbf{x}=0$
However earlier I calculated, and got: $\int_C \mathbf{F} \centerdot d \mathbf{x}=\frac {4}{\sqrt{3}}\pi a^2$
You don't get $2\int_C \mathbf{F} \centerdot d \mathbf{x}$ on the left side when you add them, you get $0$. Did you miss the minus sign? And notice the last sentence I added to that post.

#### estro

You don't get $2\int_C \mathbf{F} \centerdot d \mathbf{x}$ on the left side when you add them, you get $0$. Did you miss the minus sign? And notice the last sentence I added to that post.
Ohh I get it, so basically there is no way to use the Gauss' theorem for this purpose?

#### LCKurtz

Homework Helper
Gold Member
Ohh I get it, so basically there is no way to use the Gauss' theorem for this purpose?
Yes, that is the short answer. If you have a circuit line integral over a closed curve $C$ like that your two choices are to evaluate it directly as a line integral or to use Stokes' theorem to evaluate the corresponding surface integral over a surface for which the curve $C$ is a boundary curve.

#### estro

Yes, that is the short answer. If you have a circuit line integral over a closed curve $C$ like that your two choices are to evaluate it directly as a line integral or to use Stokes' theorem to evaluate the corresponding surface integral over a surface for which the curve $C$ is a boundary curve.
I guess I got overexcited about Gauss' theorem.

Thank you very much for your help [not for the first time]!

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving