# The electric field due to a line of charge?

Hi,
I am so stuck with this and I have the feeling that its a simple thing I'm just not realizing.

I have a line charge stretching along the x axis from 0 to a, and from 2a to 3a. with a charge density of $$\lambda$$ in each region. I have to find what the electric field is at a distance of r<3a along the x axis. I have to show that

E(r) = [$$\lambda$$a/4$$\pi$$$$\epsilon$$].( 1/[r(r-a)] + 1/[(r-3a)(r-2a)] )

{sorry about the greek letters being too high, i don't mean 4 to the power pi.epsilon}.

Attempt at solution:
What I thought might be the way to think of is to split the charge up into infinitesimal elements and integrate along from 0 to a, adding up the field at the distance r due to each charge element, then doing the same from 2a to 3a.

But, i just cannot seem to get started. My problem seems to be with the distances (the r's and the a's).

I've started off by saying $$\lambda$$ = dQ/dr

and dE = dQ/(4$$\pi$$.$$\epsilon$$.r2) = $$\lambda$$dr/(4$$\pi$$.$$\epsilon$$.r2)

But then i am just confused, this has been doing my head in all night now.

Can anyone help? very much appreciated.
thanks.

PS. if you think i haven't given enough detail or a good enough attempt at solution please say so if you aren't going to reply because of it. I only need a nudge in the right direction anyway I think. cheers.

DIAGRAM: the x's are to show where the charge is spread over, the full stops are empty space.

xxxxxxxxxx..............xxxxxxxxxx........
|---------|---------|---------|----->x
0............a.............2a..........3a

Last edited:

You've got the idea pretty correct so far. To make things a little clearer, trying calling the position of the test charge (the "r" in E(r), that is) "r", and the distance from this test charge to an infinitesimal piece of the wire "$l$".
Now if you do your equation for dE, you should have a way to tell the difference between the position of the test charge and the position of the tiny piece of wire. The replacement should be $dQ = \lambda~dl$, while the r$^2$ in the denominator should be the square of the distance between the test charge (at r) and the infinitesimal piece of wire.