If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

### Course: Electrical engineering>Unit 5

Lesson 2: Fields, potential, and voltage

# Line of charge

Advanced example: Electric field surrounding a uniformly charged infinite line. Written by Willy McAllister.

## Worked Example: Electric field near a line of charge

We derive an expression for the electric field near a line of charge.
The result will show the electric field near a line of charge falls off as $1/a$, where $a$ is the distance from the line.
Assume we have a long line of length $L$, with total charge $Q$. Assume the charge is distributed uniformly along the line. The total charge on the line is $Q$, so the charge density in coulombs/meter is,
$\mu =\frac{Q}{L}$
Assume a test charge $q$ is positioned opposite the center of the line, at a distance $a$.
What is the electric field at the location of $q$ due to (created by) the line of charge?
This derivation will lead to a general solution of the electric field for any length $L$, and any distance $a$. Using this general solution, we will solve a particularly useful case where the line is very long relative to the distance to the test charge, $L\gg a$.
First, create and name some variables to talk about.
• $a$ is the distance from the line to the location of our test charge, $q$.
• $dQ$ is a tiny amount of charge contained in a tiny section of the line, $dx$.
• $x$ is the distance from where $a$ touches the line to $dQ$.
• $r$ is the distance from $dQ$ to the location of the test charge.
• $\theta$ is the angle between $a$ and $r$.
The electric field surrounding some point charge, $Q$ is,
$E=\frac{1}{4\pi {ϵ}_{0}}\phantom{\rule{0.167em}{0ex}}\frac{Q}{{r}^{2}}$
The electric field at the location of test charge $q$ due to a small chunk of charge in the line, $dQ$ is,
$dE=\frac{1}{4\pi {ϵ}_{0}}\frac{dQ}{{r}^{2}}$
The amount of charge $dQ$ can be restated in terms of charge density, $dQ=\mu \phantom{\rule{0.167em}{0ex}}dx$,
$dE=\frac{1}{4\pi {ϵ}_{0}}\phantom{\rule{0.167em}{0ex}}\mu \phantom{\rule{0.167em}{0ex}}\frac{dx}{{r}^{2}}$
The most suitable independent variable for this problem is the angle $\theta$. The analysis is simplified by recasting the equation to sweep $d\theta$ through a range of angles instead of sweeping $dx$ along the line (this is a change of variable).
After the change of variables, we can redraw the diagram in terms of $d\theta$,
The change of variables allows us substitute $\frac{d\theta }{a}$ for $\frac{dx}{{r}^{2}}$ in the previous equation,
$dE=\frac{1}{4\pi {ϵ}_{0}}\phantom{\rule{0.167em}{0ex}}\mu \phantom{\rule{0.167em}{0ex}}\frac{d\theta }{a}$
Now we exploit the symmetry of the charge arrangement by figuring out the electric field in just the $y$ direction (the direction going straight from the line through $q$).
This means we scale the electric field $dE$ down by the cosine of the angle $\theta$,
$d{E}_{y}=\frac{1}{4\pi {ϵ}_{0}}\phantom{\rule{0.167em}{0ex}}\frac{\mu }{a}\phantom{\rule{0.167em}{0ex}}\mathrm{cos}\theta \phantom{\rule{0.167em}{0ex}}d\theta$
We are ready to integrate (add up) all the contributions from each $dQ$ to get the electric field,
${E}_{y}={\int }_{-\theta }^{+\theta }\frac{1}{4\pi {ϵ}_{0}}\frac{\mu }{a}\phantom{\rule{0.167em}{0ex}}\mathrm{cos}\theta \phantom{\rule{0.167em}{0ex}}d\theta$
This is the general solution for the electric field near any length of line, $L$, at any distance $a$ away from the line. The limits $±\theta$ are the angles to either end of the line.

### Useful case: long line of charge

Now we solve for the useful case where the line of charge is very long relative to the separation $a$, or $L\gg a$. If you stand at $q$ and turn your head to look in either direction towards each end of this very long line, your head turns (very nearly) $±\phantom{\rule{0.167em}{0ex}}{90}^{\circ }$ ($±\phantom{\rule{0.167em}{0ex}}\pi /2$ radians). These become the limits on our integration.
${E}_{y}={\int }_{-\pi /2}^{+\pi /2}\frac{1}{4\pi {ϵ}_{0}}\frac{\mu }{a}\phantom{\rule{0.167em}{0ex}}\mathrm{cos}\theta \phantom{\rule{0.167em}{0ex}}d\theta$
Move anything that doesn't depend on $\theta$ outside the integral.
${E}_{y}=\frac{1}{4\pi {ϵ}_{0}}\frac{\mu }{a}{\int }_{-\pi /2}^{+\pi /2}\phantom{\rule{0.167em}{0ex}}\mathrm{cos}\theta \phantom{\rule{0.167em}{0ex}}d\theta$
and evaluate the integral,
${E}_{y}=\frac{1}{4\pi {ϵ}_{0}}\frac{\mu }{a}\phantom{\rule{0.167em}{0ex}}\mathrm{sin}\phantom{\rule{0.167em}{0ex}}\theta \phantom{\rule{0.167em}{0ex}}{|}_{-\pi /2}^{+\pi /2}=\frac{1}{4\pi {ϵ}_{0}}\frac{\mu }{a}\phantom{\rule{0.167em}{0ex}}\left(+1--1\right)=\frac{2}{4\pi {ϵ}_{0}}\frac{\mu }{a}$
Finally, the electric field created by a long line of charge at a point $a$ away from the line is,
${E}_{y}=\frac{\mu }{2\pi {ϵ}_{0}}\frac{1}{a}$
Well done if you followed this all the way through. The important finding from this exercise is: in contrast to $1/{r}^{2}$ for a point charge, the field surrounding a line of charge falls off as $1/a$.
We did a lot of math to derive this result. It is worthwhile to take a moment to sit with this solution to let it soak in. Now that you have seen the math, does it make intuitive sense that distance has a different exponent, $1/a$, compared to a point charge, $1/{r}^{2}$?
As an amusing distraction, if you recall the fable of the butter gun from the Inverse Square Law article, can you design a new butter gun for a line of charge, that sprays in a $1/a$ pattern?

## Want to join the conversation?

• can someone explain how can we substitute d( theta ) / a for dx / (r squared) ?
(5 votes)
• The steps of the change of variable are described in the explanation link at the end of the paragraph just above where you are looking. The paragraph that starts with "The most suitable independent variable for this problem is the angle theta." Let me know if that explanation needs improvement.
(7 votes)
• I did not understand why you changed the variable !!
(2 votes)
• The equation we built up from Coulomb's Law prior to the change of variable is based on the independent variable x, the distance along the line of charge.

Somebody, a long time ago, (it wasn't me) tried to finish the problem using x and dx as the independent variable. They realized it was hard math. Then, it a flash of brilliance, whoever it was realized the best way to represent the problem was to use the angle Theta as the independent variable, and dTheta as the infinitesimal change of angle.

Rather than going back to the beginning and starting over, the shortcut is to do a "change of variable". You figure out Theta in terms of x and do a swap.

This is a good example of setting up the equations in the natural variable for setting up (x and dx), and then for finishing the problem you switch to a different natural variable for finishing the problem (Theta and dTheta). I can't say I would have ever thought of this myself, but this is the classic method of solving the line of charge.
(9 votes)
• Hi, could anyone explain the butter gun in 1/a pattern?
(3 votes)
• In my simple mind it is like this: the butter analogy hold as stated all the way to infinity in X as well in Y. Which would be equivalent to integrating from -Pi/2 to Pi/2. Only in the charge example here as "a" increases we are only expanding the field (bread) by only one dimension thus no longer a spread relative to 1/r^2 but just 1/r.
(6 votes)
• What if the angles made from the charge q to the two ends of the rod are unequal. So what limits should i apply then in order to get the general equation? I tried it, and can't figure out which angle to take negative.
(2 votes)
• If you break the beautiful symmetry of this problem it gets much harder to solve. If the line of charge has finite length and your test charge q is not in the center, then there will be a sideways force on q.

I think the approach I might take would be to break the problem up into two parts. Break the line of charge into two sections and solve each individually. One section symmetric with respect to the test charge, and another separate section for what's left on the longer side.

Solve the symmetric problem as in this article, with symmetric angles on the integral limits.
For the chunk off to the side, you have to solve a nasty vector integral, but at least all the angles have the same sign.
The final answer is the superposition (vector sum) of the forces from the two parts.
(7 votes)
• How did you integrate the integral cosθ dθ ? I dont understand it. Iam new to integration . How it converted to sinθ when we apply the limits? Help me Willy....
(1 vote)
• In the general solution it seems to me that test charge q is symmetric to the line?
Also the solution L>>a is applicable only when the test charge q symmetric to the line otherwise not?
For example L=100 cm and a=1cm here L>>a
Will the same formula apply if we put the test charge q near to the end of the line (say at 97cm from one end of the line )
Am i correct??
Please help
Thanks
(1 vote)
• You are correct. The solutions presented here assume the test charge q is straight across from (or near) the middle of the line of charge.

For a long line (your example was 1cm away from a 100cm line), the test charge q should be somewhere in the vicinity of the 50cm mark on the line, say something like +/- 10cm. The long line solution is an approximation. It assumes the angle looking from q towards the end of the line is close to 90 degrees. If you are standing at 40cm and turn your head to look at one end, you pretty much turn 90 degrees.

If you want to solve the harder problem of an asymmetric line, (example: a 10 cm line, with q 1cm away opposite the 3cm point) you can break the line up into two sections. If you cut the line at 6 cm you get a symmetric problem (6cm line with q at 3cm) plus an asymmetric chunk off to one side (4cm line with q positioned 3cm off the end). The first symmetric line we already solved in this article. The second asymmetric line looks a lot like a similar example problem we did about half way through this article: https://www.khanacademy.org/science/electrical-engineering/ee-electrostatics/ee-electric-force-and-electric-field/a/ee-electric-force
or an updated version of the article here: https://spinningnumbers.org/a/line-of-charge1.html

The total electric field is the vector sum of the two parts.
(5 votes)
• What you mean by the lines..'Now we exploit the symmetry of the charge arrangement.........'?
(1 vote)
• This article helped me a lot; I was curious if the plus C from integrating would have any relevance or explanation?
(1 vote)
• The first integral appears just before the section titled "Useful Case: Long line of charge". If I add a "+ c" to that integral expression the c would represent extra electric field coming from somewhere besides the line of charge. Maybe I left some bits and pieces of charged lines laying about on the bench nearby. Or, there's some electric field existing in my laboratory. Both of those sources would be sensed by an e-field measuring device placed at the location of test charge q.

In the simple analysis of the line of charge it is assumed that the only source of electric field is the line of charge.
(2 votes)
• what is d in change in variables dx/d(theta)=a*d/d(theta)*tan(theta)?
(1 vote)
• The d is the calculus notation for a differential, so it always stays stuck to either dx or dtheta.

The diagrams have a non-italic d whereas the text has italic d, which is a small but unfortunate flaw.
(2 votes)
• I don't understand the integral calculation where sin θ is converted to 2!!How is it evaluated??
(1 vote)
• Right after the sentence, "and evaluate the integral," the equation includes a sin θ term. The long vertical bar is the symbol for "evaluate at the limits of the integral". The vertical bar means subtract sin(lower limit) from sin(upper limit).

The upper limit is +pi/2 (90 degrees), the lower limit is -pi/2 (-90 degrees).

sin(pi/2) = +1
sin(-pi/2) = -1

The difference is +1 - (-1) = 2.
(2 votes)