A positive charge is distributed uniformly with charge density $\lambda$ along a line of length $L$. Find the electric potential of this charge distribution at point P, a horizontal distance $d$ from the line of charge (taking the potential to be 0 at infinity).


I set up the integral as follows $$V = -\int E.dr = -\int_\infty^0 \int_{-d}^{-d-L} \frac{k\lambda}{x^2} dx.dx$$

I have no idea how to evaluate such an integral. My confusion mainly stems from the equality $dx=dx$ implying the infinitesimals are interchangeable hence their corresponding limits are also interchangeable. So which limits to apply first?

Can somebody provide me suggestions (I am aware there are different definitions to $V$ but I would like to use this one. If it's not applicable, please explain)


closed as off-topic by Namaste, Mohammad Riazi-Kermani, Xander Henderson, Parcly Taxel, ahulpke Mar 9 '18 at 3:52

  • This question does not appear to be about math within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Assuming the integral is set up correctly, you would evaluate it from the inside out, like any other iterated integral. Could you explain why you are confused about how to do the integration? $\endgroup$ – Carl Mummert Mar 9 '18 at 0:03
  • $\begingroup$ Which limits to apply first? Since the variables are interchangeable (dx=dx) it follows that the limits are also interchangeable. $\endgroup$ – mathnoob123 Mar 9 '18 at 0:08
  • $\begingroup$ Can somebody please explain why I received a downvote? $\endgroup$ – mathnoob123 Mar 9 '18 at 0:09
  • $\begingroup$ Is there an obvious reason why the variables are interchangeable? Especially when we are talking about purely symbolic integrals, it isn't clear to me that Fubini's theorem would apply. For example $\int_0^a \int_0^x x \,dx\,dx$ is not the same as $\int_0^x \int_0^a x \, dx\,dx$ if we just evaluate the from the inside out. $\endgroup$ – Carl Mummert Mar 9 '18 at 0:10
  • $\begingroup$ About the downvote - I am not sure who cast it, but there is also a close vote with the reason that the voter thought this belongs on a different stackexchange site. $\endgroup$ – Carl Mummert Mar 9 '18 at 0:13

It's not clear from your question where the point P is supposed to be. I will assume it's on the same line as the charged line segment. But I don't want to limit it to that point: I want to find the electric field anywhere on that line, say at point $x_1$. By symmetry, the electric field will point along the same line. Its magnitude can be calculated as a (single) integral:

$$ E(x_1) = \int_{-L/2}^{L/2} \frac{k\lambda}{(x_1 - x)^2} dx $$

Then to calculate the potential at the point with x-coordinate $d$, you integrate the electric field along the line from $\infty$ to d:

$$ V(d) = - \int_d^{\infty} E(x_1) dx_1 $$

The dot product in the line integral becomes just an ordinary product since the electric field points in the direction of the line (I was not careful about signs, so the sign may be wrong).

But in any case, using different symbols for the different variables of integration should clarify things: first you calculate the electric field at some arbitrary point on the line with coordinate $x_1$, based on the given charge distribution (the first integral - that's just superposition of the electric fields from each tiny little piece of the line charge), then you bring a test charge in from $\infty$ to d, in order to calculate the work done (i.e. the potential - the second integral).

  • $\begingroup$ Can you explain the denominator in the first integral? $\endgroup$ – mathnoob123 Mar 9 '18 at 0:39
  • $\begingroup$ It's just the square of the distance between the point with coordinate $x_1$ and the "infinitesimal" charge at point x of the line charge. $\endgroup$ – NickD Mar 9 '18 at 0:41

On the assumption that you have set up the integral correctly, the $x$'s appearing in two occurrences of $\mathrm{d}x$, despite being given the same name, nonetheless refer to different variables. And there's no way to tell from the notation which of the two $x$'s are meant to be the same as the $x$ appearing in $x^2$. Or maybe even that $x$ is supposed to be a third variable entirely that is constant with respect to the other two $x$'s.

Problems like this are why it's a very bad thing to use the same variable to mean different things in the same scope. Generally, its preferred to outright forbid such usage, so that readers can always be confident that when the same variable is reused in the same scope, it means the same thing in every usage.

The fact that you set up the integral and are still confused, however, leaves me nearly certain of one thing:

You have not set up the integral correctly.

Without having tried to reverse engineer where you went wrong, I think the likely fixes to this state of affairs are either

  • to recognize you introduced two dummy variables when setting up the integral, and give them different names when you redo the setup
  • to actually introduce meaningful variables to be integrated over

For the sake of pedantry (i.e. I'm nearly certain that this is not what you are trying to do and/or understand), there is a situation where it does make sense to have an integrand of $f(x) \, \mathrm{d}x \mathrm{d}x$ where all of the $x$'s refer to the same thing: when this formula refers to a differential form you're integrating over a surface.

But if you really knew enough about the arithmetic of differential forms to correctly write down such a formula, you surely also be aware that $\mathrm{d}x \mathrm{d}x = 0$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.