# Electric Field of a Continuous Charge Distribution

I'm very sorry for the initial post - I was having trouble working with LaTex (I've never used it before and the preview post wasn't showing me what I had expected it to look like - it kept giving me a square root symbol for every code).

Find the electric field a distance z above the centre of a square loop (side a) carrying uniform line charge $$\lambda$$. (Hint: Use the result of Ex. 2.1.). [Griffths pg. 64]

Ex. 2.1 asks us to "find the electric field a distance z above the midpoint of a straight line segment of length 2L which carries a uniform line charge $$\lambda$$." [Griffiths pg. 62]

The result of Ex 2.1 is:

$$\vec{E} = \frac{1}{4 \pi \epsilon_o} \frac{2L \lambda}{z} \frac{1}{\sqrt {z^{2} + L^{2}} }$$

In Problem 2.4, however we have four uniform lines of charge of length a arranged such that they form a square. Supposing that the square is centred at (0, 0, 0) such that it is bounded by the lines x = -a/2, x = a/2, y= -a/2, y= a/2 (and using "the usual" orientation of the x, y and z- axis), by symmetry, the x- and y- components of the electric field at any point z along the z-axis. Therefore there exists only a z-component to the electric field.

However, in Ex. 2.1. the value of "z" is the distance from the point to the line of charge and so must be replaced by $$\sqrt{z^{2} + (\frac{a}{2})^{2}$$. Is this correct?

Then, the square root in the result is really the separation vector between the point on the z-axis and a point along the (x) axis. So in three dimension the separation vector should be $$\sqrt{z^{2} + (\frac{x}{2})^{2} + (\frac{y}{2})^{2}$$. Is this correct? My concern is that either x or y vary along each line of charge and I'm not sure how to account for this mathematically.

I further know that we must multiply the total by 4 (since there are 4 lines of charge) and by cos$$\theta$$ (for the z-component). However, cos$$\theta$$ = $$\frac{z}{r}$$ where r is the separation vector (with the dependance on x, y and z), correct?

So what I essentially expect as an answer is something along the lines of:

$$\vec{E_z} = \vec{E}cos\theta$$ = $$\frac{1}{4 \pi \epsilon_o} \frac{za \lambda}{\sqrt {z^{2} + (\frac{a}{2})^{2}}} \frac{4}{\sqrt{z^{2} + (\frac{x}{2})^{2} + (\frac{y}{2})^{2}}}$$

I'm not feeling 100% confident about this answer. I feel as if I've done most of the question properly but there's just something that doesn't feel right - mostly the dependance on x and y - the field shouldn't (at least as far as I can tell) depend on the value of x or y - so I think I might need to rewrite them in terms of a somehow?

Thanks for your patience while I struggled with Latex and I appreciate any and all responses to my questions here. Hopefully I'm on the right track, but if anyone is willing to help out that would be great!

Last edited:

Related Introductory Physics Homework Help News on Phys.org

What is the problem?

SammyS
Staff Emeritus
Homework Helper
Gold Member
Hello Tsunoyukami.

To get Latex to show any change you make, you must hit the refresh icon on your browser. It's as if it stores the previous images the Latex made in a buffer that doesn't get cleared without the refresh.

Hello Tsunoyukami.

To get Latex to show any change you make, you must hit the refresh icon on your browser. It's as if it stores the previous images the Latex made in a buffer that doesn't get cleared without the refresh.
Thank you very much for this tip! It helped me out immensely (though it still took me ages to figure everything out and make is somewhat presentable...)

by the way use \left ( \right ) for your brackets, don't use the ones on your keyboard.

SammyS
Staff Emeritus
Homework Helper
Gold Member
Is the result for Example 2.1 something like:

$$E_{z}=\frac{\lambda}{2\pi\epsilon_{0}}\cdot\frac{L}{z\sqrt{z^2+L^2}}= \frac{Q}{4\pi\epsilon_{0}}\cdot\frac{1}{z\sqrt{z^2+L^2}}\,,\text{ where }Q=2L\lambda\,.$$

Yes. That is the result of Ex. 2.1.

SammyS
Staff Emeritus
Homework Helper
Gold Member
...

The result of Ex 2.1 is:

$$\vec{E} = \frac{1}{4 \pi \epsilon_o} \frac{2L \lambda}{z} \frac{1}{\sqrt {z^{2} + L^{2}} }$$

In Problem 2.4, however we have four uniform lines of charge of length a arranged such that they form a square. Supposing that the square is centred at (0, 0, 0) such that it is bounded by the lines x = -a/2, x = a/2, y= -a/2, y= a/2 (and using "the usual" orientation of the x, y and z- axis), by symmetry, the x- and y- components of the electric field at any point z along the z-axis cancel. Therefore there exists only a z-component to the electric field.

However, in Ex. 2.1. the value of "z" is the distance from the point to the line of charge and so must be replaced by $$\sqrt{z^{2} + (\frac{a}{2})^{2}$$. Is this correct?
...
This is correct. Also replace L by a/2.

The electric field due to any single side of the square makes an angle of θ with the z-axis. To get the z-component of this vector, multiply this vector by cos(θ), where:

$$\cos(\theta)=\frac{z}{\sqrt{z^2+(a/2)^2}}$$

Multiply by 4 and that should be all you need.

In the rest of your post, you're all concerned over x & y. x & y shouldn't appear in the result: you're not integrating - you're using a result in which the integration was already done. Any effect of x & y comes from ±a/2.

This is correct. Also replace L by a/2.

The electric field due to any single side of the square makes an angle of θ with the z-axis. To get the z-component of this vector, multiply this vector by cos(θ), where:

$$\cos(\theta)=\frac{z}{\sqrt{z^2+(a/2)^2}}$$

Multiply by 4 and that should be all you need.

In the rest of your post, you're all concerned over x & y. x & y shouldn't appear in the result: you're not integrating - you're using a result in which the integration was already done. Any effect of x & y comes from ±a/2.
I don't understand why

$$\cos(\theta)=\frac{z}{\sqrt{z^2+(a/2)^2}}$$

If I understand the z component, but I feel that the root on the bottom should contain all three variables since its a three-dimensional separation vector.

How can I express the effect of x and y in terms of ±a/2? I feel like if I understand that I would have the correct answer. (I just don't understand WHY it should be ±a/2 - I tried drawing triangles and using geometry but I ended up feeling confused.)

Thanks again.

SammyS
Staff Emeritus
Homework Helper
Gold Member
The distance from (0, 0, z) to the center of any side of the square is:

$$\sqrt{z^2+(a/2)^2}$$

The distance from (0, 0, z) to the center of any side of the square is:

$$\sqrt{z^2+(a/2)^2}$$
That makes perfect sense to me. What doesn't make sense, however, is if we are considering "part" of the charge that is found at the corner of the square.

Would it then not be:

$$\sqrt{z^2+(a/2)^2+(a/2)^2}$$?

Or are we not supposed to consider that? If we are not supposed to consider that why do we not consider it?

I apologize if the answer is obvious...but I just don't see why we shouldn't consider the cos$$\theta$$ from each point of the line. Or does the formula you presented already account for this? Do we have to integrate cos$$\theta$$ from -a/2 to a/2 with respect to either x or y (depending on which line of charge we are considering) and then that component of the separation vector would cancel?

What I mean by this, suppose we consider the line of charge found at y = a/2.

So then would it be such that

$$\sqrt{z^2+x^2+y^2}$$ = $$\sqrt{z^2 + x^2 + (a/2)^2}$$

Then we would integrate with respect to x from -a/2 to a/2:

$$\int^{a/2}_{-a/2}(\sqrt{z^2 + x^2 + (a/2)^2} dx$$ = ... or am I just considering this incorrectly? Since then it would be something to the power of (3/2)...

I apologize if this is really obvious - I just don't see why the answer is as you said (yet).

SammyS
Staff Emeritus
Homework Helper
Gold Member
You're making a square from four lengths of charge : each of length a. You have previously found the electric field along the perpendicular bisector of a single length of charge - and have done so by integration. That's the result you're using from Ex 2.1 .

If you want to convince yourself: Write the vector form of the electric field due to each side of the square, then sum them.

You seem to want to ignore the result of Ex 2.1 and do the integration over the whole charge distribution. That's a lot of work.

You're making a square from four lengths of charge : each of length a. You have previously found the electric field along the perpendicular bisector of a single length of charge - and have done so by integration. That's the result you're using from Ex 2.1 .

If you want to convince yourself: Write the vector form of the electric field due to each side of the square, then sum them.

You seem to want to ignore the result of Ex 2.1 and do the integration over the whole charge distribution. That's a lot of work.
So what you're telling me is that the value of cos$$\theta$$ does not depend on the value of x and y because we have already integrated along the line of charge to get the result of 2.1 so that the field in Ex. 2.1. already accounts for one of the dimensions such that we need only consider the other to reach the centre of the square?

I'll try it again later today and try thinking of it they way you've said and then I'll post my attempt at a solution so that hopefully it will make more sense.

SammyS
Staff Emeritus
Homework Helper
Gold Member
So what you're telling me is that the value of cos$$\theta$$ does not depend on the value of x and y because we have already integrated along the line of charge to get the result of 2.1 so that the field in Ex. 2.1. already accounts for one of the dimensions such that we need only consider the other to reach the centre of the square?
...
That's not quite what I'm getting at.

cosθ depends on the x-coordinate and the y-coordinate of the center of each side and on z (the point of observation).

cosθ depends on a/2 and on z, not on x or y explicitly.