# Homework Help: Gauss's Law to find E with non-uniform charge distribution

1. May 29, 2017

### hegtor

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

Hello,

this is more of a conceptual question than a concrete homework assignment question. I'm learning about Gauss's law and the Prof did an exercise on a sphere with uniform charge distribution, where he found E(r). The trick was, that E(r) was constant over the Gaussian surface he picked. Normally you can't find the integrand of an unknown function if you know the value of the integral, but you can if the function is constant. That enabled him to find E(r).

When he finished he said you cannot deduce E(r) for a non-uniform charge distribution, because E(r) would not be constant so you couldn't pull it out of the integral. I did some research and found exercises where one finds E(r) for a non-uniform charge distribution on a sphere and there are even some posts in this forum on that.

How does this work? E(r) is not constant, right? So how can you find the integrand then?

2. Relevant equations
$$\oint_S \vec E \cdot \vec{dA}= \frac{Q_{enc}}{\varepsilon_0}$$
3. The attempt at a solution

My first idea was to construct a Gaussian surface so that E(r) would be constant on it throughout. I mean this should be possible, but the shape of this surface could be weird. This could get arbitrarily complicated though, and one couldn't compute the area of it easily if it was a weird shape...
So I'm stuck and hope you can help me look in the right way.

Last edited: May 29, 2017
2. May 29, 2017

### Orodruin

Staff Emeritus
It wouldbe easier to help you if you provided sources for these statements.

3. May 29, 2017

### hegtor

For example for a sphere and for a cylinder.

4. May 29, 2017

### ehild

E(r) means that E is function of r, the distance from a certain central point. If the charge density has spherical symmetry, depending only on r, the electric field also has spherical symmetry, its magnitude is constant over a sphere of radius r, and can be determined with the help of Gauss' Law.
As an example, assume that the charge density is of the form ρ=B/r2. Can you determine the charge enclosed in a sphere of radius R?

5. May 29, 2017

### hegtor

That makes sense!
So as long as the charge density has spherical symmetry, E(r) is constant over a sphere of some radius r from the center which I "cleverly" choose to be my Gaussian surface. Because E(r) is constant there I can pull it in front of the integral and solve for it.

But what happens for a arbitrarily weird charge density generally? Can you solve for E with Gauss's Law?
And what's with other shapes than spheres, some weird shape which you don't know the area of? Does Gauss's Law help here finding E?

As I understood up until now you always need some symmetry present otherwise Gauss's Law won't help in finding E?!

6. May 29, 2017

### ehild

Yes, the integral form of Gauss' Law can be used to find E when there is symmetry in the charge density.
In principle, you can use the Poisson equation to find the electric potential V(x,y,z) in case of arbitrary charge density ρ(x,y,z), and get E as the negative gradient of the potential function.
http://farside.ph.utexas.edu/teaching/em/lectures/node31.html

7. Jun 3, 2017

### rude man

You can in principle also vectorially sum the forces due to all the charges in your sphere on a unit test charge but that is similarly practically infeasible for arbitrary charge distributions.