# Gauss's Law with non-uniform E-field

Why does being non-uniform make it any different?

Is there no meaning in this?

$$\frac{Q_{charge\;of\;cylinder}\int \rho dV}{\rho V} = \frac{Q_{charge\;of\;cylinder}2\pi l \frac{e^{ar} (ar - 1) + 1}{a^2}}{e^{ar} \pi R^2 l}= Q_{en}$$

Last edited by a moderator:
Doc Al
Mentor
Why does being non-uniform make it any different?
As I said earlier, the charge is always:

$$Q_{en} = \int \rho dV$$

When the charge density is constant you can pull it out of the integral and then use the ratio of volumes and the total charge, if you like. (But why???)

When the charge density is not constant, you cannot do that.

Is there no meaning in this?

$$\frac{Q_{charge\;of\;cylinder}\int \rho dV}{\rho V} = \frac{Q_{charge\;of\;cylinder}2\pi l \frac{e^{ar} (ar - 1) + 1}{a^2}}{e^{ar} \pi R^2 l}= Q_{en}$$
It seems quite convoluted. (Note that, since the charge density is not constant, $\rho V$ doesn't mean what I assume you think it means.)

Sorry at the end i meant

$$\frac{Q_{charge\;of\;cylinder}2\pi l \frac{e^{ar} (ar - 1) + 1}{a^2}}{e^{aR} \pi R^2}$$

Like I evalutated the non-uniform density at R for e^ar

Last edited:
Doc Al
Mentor

Okay fixed! thanks

Doc Al
Mentor
Sorry at the end i meant

$$\frac{Q_{charge\;of\;cylinder}2\pi l \frac{e^{ar} (ar - 1) + 1}{a^2}}{e^{aR} \pi R^2}$$

Like I evalutated the non-uniform density at R for e^ar
What's that a calculation of? And why would your answer have Q in it--you are given the charge density as a function of a and r. I would not accept an answer that had Q in it.

This stuff $$\frac{[2\pi l \frac{e^{ar} (ar - 1) + 1}{a^2}}{e^{aR} \pi R^2$$

is supposed to cancel itself out (dimension analytically)

Just wondering, does that mean part ii will be the same answer?

Doc Al
Mentor
Just wondering, does that mean part ii will be the same answer?
No. Why would you think that?

Because the gaussian surface is now bigger...?

Actually a better question would be, why wouldn't it be different?

Doc Al
Mentor
When inside the charged sphere, as r changes so does the total charge contained within r. But once you are outside of the sphere, the total charge remains fixed.

Why? Shouldn't it get weaker?

Someone come back

Doc Al
Mentor
Why? Shouldn't it get weaker?
Shouldn't what get weaker? (If you're responding to my last post, realize that I was talking about charge not field strength.)

Shouldn't what get weaker? (If you're responding to my last post, realize that I was talking about charge not field strength.)

Well the density is non-uniform

$$\rho = \frac{Q}{V}$$

Volume can't really change so

$$\rho\; \alpha \;Q$$

so as radius goes up, density goes down and since they are proportional, charge drops?

Doc Al
Mentor
Well the density is non-uniform

$$\rho = \frac{Q}{V}$$

Volume can't really change so

$$\rho\; \alpha \;Q$$

so as radius goes up, density goes down and since they are proportional, charge drops?
I have no idea what you're talking about.

Within the sphere, obviously the total charge within your Gaussian sphere increases with radius; Outside the sphere, there's no additional charge so the total charge remains fixed.

$$Q_{en} = \int \rho dV$$

I am going to take a while shot at this one. Since we are looking at r > R, that means we only care about the field r > R

I think it would be

$$Q_{en} = \int_{R}^{r} \rho dV$$

But r > R not greater or EQUAL to. In other words, even though our Gaussian surface encloses the whole surface, it only cares about outside of r > R

Doc Al
Mentor
I think it would be

$$Q_{en} = \int_{R}^{r} \rho dV$$
No. The relevant charge is everything contained within the Gaussian surface. Since the charge only extends to R, we have (for a Gaussian surface with r > R):

$$Q_{en} = \int_{0}^{R} \rho dV$$

But $$Q_{en} = \int_{0}^{R} \rho dV$$ is for a Gaussian surface that has radius R.

WOuld it be...

$$Q_{en} = \int_{0}^{R} \rho dV + \int_{R}^{r} \rho dV$$

That includes inside and outside!?

EDIT: wait, that's no different from my first integral then...

EDIT2: nvm, you are right. My other integral encloses no charge because from R to r, it is just space. I keep thinking my integral is summing field, not charge.

wait would the integral change if the density was uniform?

Actually I should show you the final answer first to repay your time you put into helping me

$$2\pi l\int_{0}^{R} re^{ar} dr = 2\pi l \frac{e^{aR} (aR - 1) + 1}{a^2}$$

$$\oint \vec{E} \cdot d\vec{A} = 2\pi l \frac{e^{aR} (aR - 1) + 1}{\epsilon_0 a^2}$$

$$\vec{E} = \frac{e^{aR} (aR - 1) + 1}{\epsilon_0ra^2} \hat{r}$$