# Homework Help: Pretty much worked out, but stuck Gauss' Law problem

1. Apr 29, 2010

### zSanityz

Pretty much worked out, but stuck!!! Gauss' Law problem

1. The problem statement, all variables and given/known data
"Consider a charge density distribution in space given by $$\rho = \rho_0 e^{-r/a}$$, where $$\rho_0$$ and $$a$$ are constants. Using Gauss' Law, derive an expression for the electric field as a function of radial distance, $$r$$. Sketch the $$E$$ vs. $$r$$ graph."

2. Relevant equations
$$\oint \vec D \cdot d\vec s = \int \rho dv=Q$$
$$E_r = {{\int \rho dv}\over{4 \pi \epsilon R^2}}$$

Now all I'm pretty sure I just need to integrate it through, and I'll be able to isolate $$\rho$$ and substitute it back in the original equation $$\rho = \rho_0 e^{-r/a}$$ and finally isolate $$E$$ for an answer.

I really can't figure out how to integrate this though, if anyone could explain / go through it, that would be really helpful!

Thank you
<3's

Last edited: Apr 29, 2010
2. Apr 29, 2010

### CompuChip

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Note that actually, r stands for $\sqrt{x^2 + y^2 + z^2}$ and the volume we are talking about is a (filled) sphere.

So, have you tried converting to spherical coordinates? Then the angular integrations will become trivial and the exponent is precisely the remaining integration variable.

3. Apr 29, 2010

### xcvxcvvc

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Your area is a sphere with a charge density that varies with radius, so you could use spherical coordinates to sum the charge.

theta goes between 0 and pi and phi goes between 0 and 2pi i think

4. Apr 29, 2010

### elect_eng

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

It's generally better to keep all of your posts on one problem in the same thread. It makes it easier for people to help. I'm surprised that a math major is having trouble doing this basic integration, but I assume this is a result of you not understanding the physics and not associating the physical quantities with the mathematical entities.

The above answer basically has it correct, but just to make it more explicit try this. (EDIT: note that I swapped the definitions of phi and theta compared to the above post)

$$E_r = {{\int \rho dv}\over{4 \pi \epsilon R^2}}$$

$$E_r = {{\int_0^\pi \int_0^{2\pi} \int_0^R \rho_0 e^{-r/a} r^2 \sin \phi dr d\theta d\phi}\over{4 \pi \epsilon R^2}}$$

Physically, what you are doing here is integrating the charge density (charge per unit volume) over the entire sphere inside the radius you are calculating the electric field at. This is just the total enclosed charge. This total enclosed charge acts like a point charge with the same total charge. The field is then equal to that of a point charge with charge Q as you calculated with the integral. Very simple if you understand what Gauss's law is saying physically. The spherical symmetry allows Gauss's law to give you the answer almost without thinking, provided you understand the physics.

In general, Gauss's law is only useful when there is symmetry that you can exploit. In other cases, it is often easier to use Coulomb's law and just integrate the field of each volume element (with given charge density). As an exercise you can try this to see if you get the same answer. This should be very easy for a math major, and will really help you get a handle on the physical concepts.

By the way, I have now done the integral out explicitely, but I don't want to give you the answer. However, if you post your solution, I am willing to verify it for you and tell you whether or not I agree.

Last edited: Apr 29, 2010
5. May 1, 2010

### zSanityz

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Alright, still all sounds fairly confusing, but I'm going to try to work through it on paper, and I'll post what I get. (still all seems a bit tough for calculus based physics 1 :( )

Feel free to post any other suggestions or comments if anyone has one, they all help!!
<3's

6. May 1, 2010

### zSanityz

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Sorry, I just wasn't grasping it (still not sure if I am). I'm not familiar on how to integrate variables in terms of other variables (i.e integrating $$\phi$$ in terms of r and vice versa), it's just something that wasn't possible in calc I. If it was deriving, you'd simply make it a derivative, and depending on it's interaction with any other variable, apply the rule that went with it, but these aren't quite the same as x's and y's. :/

7. May 1, 2010

### elect_eng

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

OK, this is a Calc 3 type problem, maybe you haven't taken this yet, or if you have maybe the concepts are not fully crystalized in your mind yet.

The position or coordinate variables are independent, hence the inner integrals can be performed in terms of the inner variables, while treating the outer variables as constants. This particular triple integral becomes separable because of the particular function involved. I'll try another simplification step for you, and then you can go from there.

Consider the following.

$$E_r = {{\int_0^\pi \int_0^{2\pi} \int_0^R \rho_0 e^{-r/a} r^2 \sin \phi dr d\theta d\phi}\over{4 \pi \epsilon R^2}}$$

Since each coordinate variable is independent of the others, we can do the following.

$$E_r = {{\rho_0\;\int_0^\pi \sin \phi d\phi \; \int_0^{2\pi} d\theta \; \int_0^R e^{-r/a} r^2 dr }\over{4 \pi \epsilon R^2}}$$

Remember that $$a$$ is a constant. The integrals are very easy, but the radial one is a little more difficult than the others. I used an integral table for the radial integral in order to save time, but it's not too hard to figure that one out with some thought.

8. May 1, 2010

### zSanityz

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Lol, I've only done Calc I. :X But wow! I had no idea you could do that with the integrals, that makes it MUCH more understandable. :D That was my main problem for sure, though after working through it that $$\int_0^R e^{-r/a} r^2 dr$$ was a little tricky, but I think I got it figured. ^-^

After going through it all this, this is what I came up with:
$$E_r = {{\rho_0 (2a^3 - e^{-R/a}(a R^2 + 2 a^2 R + 2 a^3))}\over{2\epsilon_0 R^2}}$$

Looks a bit messy, but I think it's right. :Z
<3's

9. May 1, 2010

### elect_eng

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Ah, OK! That makes me feel much better. It's unusual to find someone doing field problems with only Calc 1. Yeah, field theory really needs full vector calculus to really sink in well. Well, it will come to you quickly, so no problems.

I did this out at work and now don't have the paper with me. However, it does look correct (or at least very close) going from my memory. I'll double check on Monday and give you a final yes/no answer then.

10. May 1, 2010

### zSanityz

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

Wonderful! :D

Also, if I messed up somewhere it would've been with the $$\int_0^R e^{-r/a} r^2 dr$$, and that just becomes the $$2a^3 - e^{-R/a}(a R^2 + 2 a^2 R + 2 a^3)$$ after an $$s=-r$$ substitution, and then integrating by parts twice to get $$e^{s/a}$$ alone in an integral, correct? ^-^

By the way, thank you sooo much for all the help!! I'm sure I didn't make it easy on you with my limited knowledge of higher level physics and math, but I am happy to have learned that with the multiple integrals you treat the other variables like constants, or separate them like you did to make it easier on the eyes. <3's

11. May 1, 2010

### xcvxcvvc

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

that's a bit lame that you're asked to do volume integrals without a prerequisite to the class being calc III

12. May 1, 2010

### elect_eng

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

So, I had a few minutes before bed and figured this would be good to put me to sleep.

I get the same answer as you for the radial integral. However, somehow I got 2 times the answer you did for Er. Of course, I could have made a mistake, but you might want to double check your answer. Did you obtain 2 for the phi integral and 2pi for the theta integral? This would give you 4pi for the total solid angle for a sphere, which I believe is correct.

13. May 2, 2010

### zSanityz

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

When I think about it, your answer does look and seem more correct, and... ohhh, I forgot to subtract $$cos0$$!, lol. Thank you once again. ^-^ <3

14. May 2, 2010

### elect_eng

Re: Pretty much worked out, but stuck!!! Gauss' Law problem

OK, very good! I wish you luck in your studies.