# Gauss law and surface vector

Hi all,

Lets suppose we have a sphere.
This sphere has density of $\rho$(r) from 0 to the sphere's final radius R.

Now, we all know that from Gauss law, the charge inside the sphere equals to the integral of the surface of the sphere.
If we set our normal vector to be as usual out of the sphere and our surface is the sphere than we have of course Qtot which is integral on the total volume.

But, let me ask you guys something else. what if our surface is a smaller sphere with radius R1 (let's symbol it S') and bigger sphere with radius R2, we'll symbol it S.
the total charge should be $\int\rho$(r)dv from R1 to R2
but how about the surface integral? I mean integral on the Surface is integral on S plus integral on S'.
now, if the normal to the surface is out of the surface what we get is ∫Eds+∫Eds'=Qtot+$\int\rho$(r)dv from 0 to R1.
yes, something is wrong here. can you tell what is it and explain?

* We all can solve it in another way, but that's not what i'm looking for. just want you guys to tell me if you see something wrong with the mathematics here.... (I think I know the problem but wanted to be sure about it - I believe that if the field is outside you should say the surface vector is on the other direction, meaning the surface vector of the inner sphere is the opposite of the outer sphere)

mfb
Mentor
"Outwards" in your case means "towards r=0" in the inner surface (it is out of the enclosed volume of your surface). You will get Q minus the charge in the innermost region if you do the surface integral properly.

my following question

thanks.
So now I can continue to my following question (the real purpose of the thread)
it's attached as pdf file.

Edit: I got it. the professor did some mistakes with the directions of the surface vectors. said one thing and did another...

#### Attachments

• question1.pdf
162.8 KB · Views: 155
Last edited: