# Calculating the volume charge density

Tags:
1. Nov 28, 2016

### doktorwho

1. The problem statement, all variables and given/known data

Volume charge density in some space is given by a function $ρ_v(x)=-ρ_0\frac{x}{a}e^{\frac{-x^2}{a^2}}$ where $ρ_0, a$ are positive constants. Determine the electric field vector in arbitrarily chosen point in space.

2. Relevant equations

3. The attempt at a solution

I find it very important to understand the procedure so im gonna explain what im doing so you can provide a better feedback.
1) I drew a picture that i think suits best

2) I choose an arbitrary point and assign the imagined vector fields that act from each side (i figured that the charge exists everywhere)

I know have an idea how to solve it but dont know if it is correct. I now wrote the expression for calculating the electric field from the left charges in the chosen point by taking the Gauss's surface (a cylinder) and placed in along the $x-axis$ but with one of its sides in the minus infinity.
$$∫E_ldS=\frac{∫ρ_vdV}{ε_0}$$
$$E_l=\frac{\int_{-\infty}^{x}ρ_vdx}{ε_0}$$
So my resutant electric field at point $x$ is equal to:
$$E=E_l-E_r$$
$$E=\frac{\int_{-\infty}^{x}ρ_vdx}{ε_0} - \frac{\int_{x}^{\infty}ρ_vdx}{ε_0}$$
Do you think this is correct?

#### Attached Files:

• ###### IMG_2012.JPG
File size:
22.2 KB
Views:
33
Last edited by a moderator: Nov 28, 2016
2. Nov 28, 2016

### TSny

You do not need to consider the electric field "from each side". When you solve for E at a chosen point using Gauss' law, E will be the total electric field from all of the charge in the system.
That's a good choice for the Gaussian surface. But, when you use Gauss' law for this surface, the symbol E in Gauss' law is the total electric field from all of the charge in the system. That is, E is the total field due to the charge inside the Gaussian surface as well as the charge outside the surface.
OK. But $E_l$ is not the field "from the left". It is the total field at the right end of the cylindrical Gaussian surface due to all of the charge in the system (from x = -∞ to x = +∞).
No. From the above remarks, do you see why this is not correct?

3. Nov 28, 2016

### Delta²

Something else, it is unclear if the volume charge density is restricted to the x-axis (so that $\rho_v(x,y,z)=0$ if y,z<>0) or it covers the whole space (but just varying along the x-axis). if it is the latter case then one must perform integration along the y and z variables (or the correspondent variables in cylindrical coordinates).

4. Nov 28, 2016

### doktorwho

Tsny, so your saying that when i take the gaussian surface and apply it the way i did i will get the same answer no matter which side i took? So the answer here would be just the field thats named the left? And Delta yes it is restricted aling the x-axis it is stated but i forgot to mention it..

5. Nov 28, 2016

### TSny

Yes. However, to complete your solution, you have to justify taking the field to be zero at -∞ or +∞.

6. Nov 28, 2016

### doktorwho

I don't understand why the Gauss's sphere that encapsulates only the left part expresses the full electric field. I looked at a solution from the book and it says that the total electric field at some point $x$ is supposed to be $E(x)=\frac{aρ_0}{2ε0}e^{\frac{-x^2}{a^2}}$. Does this agree with your take on the problem?

7. Nov 28, 2016

### TSny

To understand why this is so, you need to understand the derivation of Gauss' law. Also, it helps to review the standard examples that illustrate the application Gauss' law. For example, you have probably seen how Gauss' law is used to find the E field of an infinitely long, uniformly charged line. In this example you take a cylinder as the Gaussian surface. The surface encloses only part of the charge of the system. Yet, the result that you get for E is the total electric field due to all of the charge on the line.
Yes.

Another approach is to use the differential form of Gauss' law: $\vec{\nabla} \cdot \vec{E} = \frac{\rho}{\varepsilon_0}$. But I don't know if you are familiar with this.
If not, your approach to the problem is good.

8. Nov 28, 2016

### doktorwho

Ok i think i understand it more clearly now, but this isnt the case always right? I mean what if the charge density was described by some other function? For example if i think of an odd function so that the total charge from minus infinity to plus infinity is zero? How would the field be then?

9. Nov 28, 2016

### TSny

I'm sorry, but I'm not sure what you are referring to when you say "this isn't the case always".
But the charge density given in this problem is an odd function of x.

10. Nov 28, 2016

### doktorwho

Oh yeah, i just thought that generally this might not be the case.. so what your saying that no matter what the function of volume charge distribution is i can set up a gaussian surface and set one of the bazes of the cylinday to be in the infinity and just calculate the integral of the function to that point x?

11. Nov 28, 2016

### TSny

No. You can't do that for any volume charge distribution $\rho(x)$ that depends only on x. For an arbitrary $\rho(x)$, the field E might not go to zero at infinity. Thus, you cannot neglect the electric flux through the end of the cylindrical Gaussian surface that is at x = -∞. In your specific problem, you can show that E does go to zero at infinity, so your method will work. You should get the same answer for this problem if the cylinder has an end at +∞ rather than at -∞.

As an exercise, use Gauss' law to find E everywhere for the case that

$\rho(x) = \begin{cases} \rho_0 & \quad \text{if } -a < x < a \\ 0 & \quad \text{otherwise}\\ \end{cases}$

where $\rho_0$ is a positive constant.

12. Nov 29, 2016

### doktorwho

Well i could do it like this, if we're looking for the electric field putside the given $-a, a$ interval i just apole the gausses law that takes in its cylinder all of the charge and integrate the charge density from $-a, a$. In case i want my point to be in the inside then i think we must the left and the right side of the field right? It would be 0 at the coordinate beggining then? Is this wrong thinking also? Im confused as to how to deal with so many available function to describe the charges.. is there a big picture i can see here, or anywhere else in a situation like this?

13. Nov 29, 2016

### TSny

That sounds like the right approach. I would have to see the details to make sure. In particular, exactly how would you place the cylinder? What sort of symmetry arguments would you use?

I don't follow what you are saying here when you refer to the "left and right side of the the field".
Yes, E = 0 at x = 0. That's due to the symmetry of the charge distribution. To find E at a point P inside the charge distribution, you can use a cylinder with one end at x = 0 and the other end at the point where you are finding the field.
The big picture is that Gauss' law is always true, but you need to have a certain amount of symmetry in the charge distribution in order to use the law to find E at some point. The symmetry is used to help choose the shape of the Gaussian surface. The electric field that you find at a point using Gauss' law is the total electric field due to all the charge in the system (not just due to the charge within the Gaussian surface).

14. Nov 29, 2016

### doktorwho

I would place the cylinder as if the $x-axis$ passes through the center of its basses (the circles). And as for the point in the charge system i would now place the cylinder to the left or the right so that its one side goes though the $x$ and one side there where there is no field. Is this right?
$$E=\frac{\int_{-a}^{a}ρ_0dx}{ε_0}$$ for the total electric field at some point outside the system
$$E=\frac{\int_{-a}^{0}ρ_0dx}{ε_0}$$ if the point i want to calculate the field in is $0$. But it doesnt seem correct for the second part does it? Do i get the field at that point to be 0?

15. Nov 29, 2016

### TSny

I don't believe either expression for E is correct.

If the point P for which you want to find E is located intside the charge distribution, you could choose the cylindrical Gaussian surface in a couple of different ways:

If P is outside the charge distribution, you could similarly choose the surface in a couple of different ways:

16. Nov 29, 2016

### doktorwho

1) For the point outside the charge system:
$\oint E dS = \frac{Q}{ε_0}= 2ES=\frac{\int_{-a}^{a} ρ_0 Sdx}{ε_0}$
This should be the expression for the point outside the charge system, i cant figure out why is not..
And as for the point inside the system, if we choose the point to be some $x$ must the surface be from $-x,x$? Cant i place the surface from some point in the outside to that point $x$? And then integrate from $-a$ or $a$ to $x$?

17. Nov 29, 2016

### TSny

This is correct. So, what do you get for E in this case?

Yes, you could do it this way as long as you have already figured out E for points outside the charge distribution. If you haven't already found E outside, then I think the two choices for the cylinder that I showed in the diagram would be better choices.

18. Nov 29, 2016

### doktorwho

I get $E=\frac{ρ_0a}{ε_0}$, but lets say i want to calculate the field in $x=0$ which we said should be 0 because of the symmetry, right? You now whats confusing to me about the second part, what size is my cylinder. I mean i want to calculate at point 0 but from where do i start expanding the cylinder so that it ends at point 0. If i choose to start at $-a$ to $x=0$ i get $2ES=\frac{\int_{-a}^{0}ρ_0Sdx}{ε_0}$ and that cant be 0..so whats wrong, where is my thinking wrong?

19. Nov 29, 2016

### TSny

How did you get 2ES? The flux through one end of the cylinder does not necessarily equal the flux through the other end.

20. Nov 29, 2016

### doktorwho

Oh, well in that case can i place the one end to be outside where i know the field? Then the right expression remains but i have $-E_{outside}S$ on the right side as well. The original right side when integrated equals the field outside and when it goes to the right side they cancel out. Is that it?