# Calculating the electric field of an infinite flat 2D sheet of charge [closed]

I was trying to calculate the electric field of an infinite flat sheet of charge. I considered the sheet to be the plane $z=0$ and the position where the electric field is calculated to be $(0,0,z_0)$, I know that the electric field from a line charge is with charge density $\lambda$ is $E(r)=\frac{\lambda}{2\pi r\epsilon_0}$. I ended up with this integral: $$\int_{-\infty}^{\infty}\frac{\sigma}{2\pi\epsilon_0 \sqrt{x^2+z_0^2}} \left(\frac{-x}{\sqrt{x^2+z_0^2}}i+\frac{z_0}{\sqrt{x^2+z_0^2}}k\right) dx=\int_{-\infty}^{\infty}\frac{\sigma}{2\pi\epsilon_0 (x^2+z_0^2)} \left(-xi+z_0k\right) dx.$$The $z$-component gives the correct answer. $$\int_{-\infty}^{\infty}\frac{\sigma}{2\pi\epsilon_0 (x^2+z_0^2)} z_0 dx=\frac{\sigma}{2\pi\epsilon_0}\arctan\left(\frac{x}{z_0}\right)\Big|_{-\infty}^{\infty}=\frac{\sigma}{2\epsilon_0}.$$ But when I wanted to verify that the $x$-component is zero, I encountered a divergent integral.$$\int_{-\infty}^{\infty}\frac{\sigma}{2\pi\epsilon_0 (x^2+z_0^2)} x dx=\ln\left(x^2+z_0^2\right)\Big|_{-\infty}^{\infty}.$$ Why is that? Where am I getting wrong?

## closed as off-topic by Kyle Kanos, Jon Custer, stafusa, ZeroTheHero, AccidentalFourierTransformAug 18 '18 at 22:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Kyle Kanos, Jon Custer, stafusa, ZeroTheHero, AccidentalFourierTransform
If this question can be reworded to fit the rules in the help center, please edit the question.

• The answer shouldn't depend on z. The electric flux through any plane parallel to the surface should be the same (because the divergence of an electric field is zero in the absence of a charged particle). So the electric field will be constant everywhere for z>0. – Peter Webb Mar 1 '15 at 14:28

I don't see any problems up until maybe the very very last step (where you lost some constants at the very least and I can't tell what you were trying to do or why you think there is a problem). So you were at:

$$\int_{-\infty}^{\infty}\frac{\sigma}{2\pi\epsilon_0 (x^2+z_0^2)} x dx.$$

I'm not sure if you then tried a u-substitution or just found an antiderivative.

To do a u-substitution, you often need to have a function $u(x)$ that is increasing. In your case it looks like you tried $u=x^2+z_0^2$, but then the full range of $x$ only has $u$ go from $z_0^2$ to $+\infty$, and that full range of $u$ only covers half the $x$ values. There are two approaches when you have problems like this. You can break your integrand $f(x)$ into two parts, an even part $E(x)=\frac{f(x)+f(-x)}{2}$ and an odd part $O(x)=\frac{f(x)-f(-x)}{2}$ so that $f(x)=E(x)+O(x)$ and thus $\int_{-\infty}^{+\infty}f(x)dx=\int_{-\infty}^{+\infty} E(x)+O(x) dx =\int_{-\infty}^{+\infty}E(x)dx=2\int_{0}^{+\infty}E(x)dx$. You can now safely do the u-substitution in question on the even part. If you do this in your case, the even part is zero, so your integral is zero.

Let's say instead you simply found an antiderivative: You noticed that

$$\frac{\sigma}{4\pi\epsilon_0}\ln\left(x^2+z_0^2\right),$$

is a function whose derivative is your integrand. But now, to use this antiderivative, you have an improper integral where both the limits are infinite. Sometimes you can break those things into two parts, say $-\infty$ to zero as one integral, and then zero to $+\infty$ as another integral. But you are correct that if you do this those integrals are divergent. This means your integral isn't a super well defined thing (it's not technically integrable). But it is very close to integrable, so instead of having an integral it has something called a principle value, which is:

$$\lim_{b\rightarrow\infty}\int_{-b}^{b}\frac{\sigma}{2\pi\epsilon_0 (x^2+z_0^2)} x dx=\lim_{b\rightarrow\infty}\frac{\sigma}{4\pi\epsilon_0}\ln\left(x^2+z_0^2\right)\Big|_{x=-b}^{x=b}=0.$$

And taking the principle value is actually exactly what we are doing when we break the integrand into even and odd parts and integrate the even part from zero to $\infty$.

Why is that? Where am I getting wrong?

The proper approach is to note that the integrand for the $x$ component is an odd function of $x$.

But first, recall that

$$\int_{-a}^a f(x)dx = \int_{-a}^0 f(x)dx + \int_{0}^a f(x)dx = \int_a^0 f(-x)dx + \int_{0}^a f(x)dx$$

Now, for an odd function,

$$f(-x) = -f(x)$$

thus

$$\int_a^0 f(-x)dx + \int_{0}^a f(x)dx = -\int_0^a f(x)dx + \int_{0}^a f(x)dx = 0$$