# The line charge integral

#### Prerequisites

The integral of the field near to a very long (approximated by infinitely long) straight line of uniform charge gives a nice example of how to use the physics of Coulomb's law to see how to construct and add up the contributions of a line of charge by integration.

Let's suppose we have a very long straight line of charge that we are going to model for the sake of simplifying the math as infinitely long. The situation looks like the figure below. (We'll use $D$ for the distance from the line charge instead of $d$ to avoid confusion with the "$d$" in the "$dx$" of our integral.) The line charge is drawn in blue and is intended to go on forever on both sides. We'll put the origin of our coordinate system right underneath the point at which we are trying to find the E field (shown as a pink dot).

Physically, we'll imagine the line charge as made up of lots of little bits of charge of length $dx$ shown by a little box. Each of those bits of charge creates an E field, $dE$ at the pink dot by Coulomb's law. We have to add up all the $dE$s created by all the bits of charge along the infinite line of charge.

Our little bit of the line $dx$ has an amount of charge equal to $dq = \lambda dx$, and its distance from the pink dot is

$$r = \sqrt{x^2 + D^2}$$

By Coulomb's law we know that the magnitude of *dE* is given by

$$dE = \frac{k_Cdq}{r^2}$$

We can use our equations to express both $dq$ and $r$ in terms of x and the parameters of the problem, $D$ and $\lambda$ to get

$$dE = k_C\lambda\frac{dx}{x^2 + D^2}$$

We can't quite add this all up (do the integral) to get the final result since this dE is a vector. And from our discussion in A simple electric model: a line charge, we know that the horizontal component of this vector is going to be cancelled by an opposite component from a bit of charge on the other side. So we ONLY want to add up the vertical components of this vector.

As we see from the inset diagram (just *dE* made larger), what we need to do to get the vertical component of *dE* is to multiply it by $\cos{θ}$. But from looking at our diagram, we can see that

$$\cos{\theta} = \frac{D}{r} = \frac{D}{\sqrt{x^2+D^2}}$$

So what we have to add up the y component of E. Since the x component cancels (there is a piece on the other side of $dx$ at $-x$ that cancels the x-component of the piece at $x$), the y-component is the entire magnitude of the E field. If we just write this out carefully, we get:

$$E = \int^{+\infty}_{-\infty} k_C\lambda \frac{dx}{x^2+D^2} \cos{\theta} $$

Pulling out the constants and putting in our value for $\cos{\theta}$ we get

$$E = k_C\lambda\int^{+\infty}_{-\infty} \frac{dx}{x^2+D^2} \frac{D}{\sqrt{x^2+D^2}}$$

giving

$$E = k_CD\lambda\int^{+\infty}_{-\infty} \frac{dx}{(x^2+D^2)^{3/2}}$$

This looks like and awful mess, but it's not really so bad. It's just a bunch of constants out front times an integral that is beginning to look like a standard integral from a calculus class.

We can make it look more like that by changing integration variable (getting rid of the units) by defining $u = x/D$. If we change to this variable our integral becomes

$$\int^{+\infty}_{-\infty} \frac{dx}{(x^2+D^2)^{3/2}} = \int^{+\infty}_{-\infty} \frac{Ddu}{(u^2D^2+D^2)^{3/2}} = \frac{D}{(D^2)^{3/2}} \int^{+\infty}_{-\infty} \frac{du}{(u^2+1)^{3/2}}$$

or finally

$$\frac{1}{D^2} \int^{+\infty}_{-\infty} \frac{du}{(u^2+1)^{3/2}}$$

(We could have known that we'd get a factor of $1/D^2$ times a dimensionless integral from looking at the $dx$ integral and realizing that the integrand had a length ([$dx$] = L) divided by a length squared to the 3/2 power ([$x^2 +D^2)^{3/2}$] = (L^{2})^{3/2} = L^{3}).

That integral can be found in a table or online. You can put it into Wolfram|alpha as integral(1/(1+u^2)^(1.5),-infinity,infinity) and discover that the value of the integral is simply 2. (Or if you are gung-ho you can do a trigonometric substitution and work it out for yourself.) When we put all of this together we get the simple result:

$$E = k_C\lambda D \frac{2}{D^2} = \frac{2k_C\lambda}{D}$$

as claimed in "A simple electric model: a line charge".

Now if you are really gung-ho, you can do that integral of u numerically (say on a spreadsheet) and see how far out you have to go to get, say, 1.99. (That, of course, will tell you how far in u you have to go. To get x, you have to multiply that result by D.) That way you can see what part of the line near to where we are measuring the field really matters. We can get a good sense of it by looking at the integrand. Plotting $1/(u^2 + 1)^{3/2}$ on Desmos graphing calculatorgives the graph below:

The integral is the area under this curve. We can see the that almost all of the contribution to the integrand comes from between $u$ = -4 and +4, which corresponds to the real line charge between $x = -4D$ and $+4D$.

This tells us that the model of treating a line of charge as infinitely long is probably pretty good if you are a distance $D$ from the line and the line below you is straight and doesn't end a distance $4D$ in either direction.

Note that we already knew the result had to be proportional to $k_Cλ/D$ by dimensional analysis. All the mathematical heavy lifting was required just to get the factor of 2 in front.

Joe Redish 2/15/12

#### Follow-on

Last Modified: May 22, 2019