# Electric Field Calculation (Square Wire)

1. Feb 26, 2017

### Arman777

1. The problem statement, all variables and given/known data
Find the electric field a distance $z$ above center of a square loop of wire,each of whose sides has lenght $l$ and uniform charge per lenght $λ$

2. Relevant equations
$dE=\frac {1} {4πε_0} dq \frac {1} {r^2}$ (magnitude)

3. The attempt at a solution
I have a pic.

So $dq=λdx$
$dE=\frac {1} {4πε_0} dq \frac {1} {r^2}$
$r^2$ is here
$x^2+(\frac {l^2} {4})+z^2$

$E_x=E_y=0$
so the equation becomes,
$dE=\frac {1} {4πε_0} dq \frac {1} {x^2+(\frac {l^2} {4})+z^2}sinθ$ which its
$dE=\frac {1} {4πε_0} dq \frac {1} {x^2+(\frac {l^2} {4})+z^2}\frac {z} {\sqrt {(\frac {l^2} {4})+x^2}}$

From there I get

$E=\frac {zλ} {4πε_0}\int_{\frac {-l} {2}}^{\frac {l} {2}}\frac {8} {(4x^2+l^2+4z^2)(\sqrt {l^2+4z^2})} \, dx$

I stucked at the integral part.I tried calculator but it didnt work out.And before that, are my equations true ? Of course for result I have to mulitply this by $4$ so the answer is
$E_{total}=4E$
It will be in the vertical direction

Last edited: Feb 26, 2017
2. Feb 26, 2017

### TSny

See if you can find the mistake in setting $\sin\theta = \frac {z} {\sqrt {(\frac {l^2} {4})+x^2}}$

3. Feb 26, 2017

### Arman777

Looks right for me ?

4. Feb 26, 2017

### TSny

What is the length of the hypotenuse of the right triangle which has the angle θ indicated in your sketch?

5. Feb 26, 2017

### Arman777

I see yeah thanks

6. Feb 26, 2017

### Arman777

I found but I used calculator to find $\int_\frac {1} {(4x^2+l^2+4z^2)^{\frac {3} {2}}} \ dx$ is it too bad ?

7. Feb 26, 2017

### TSny

The denominator should be raised to some power other than 1.

8. Feb 26, 2017

### Arman777

I fixed sorry my typo

9. Feb 26, 2017

### Arman777

Its hard to write such things in here

10. Feb 26, 2017

### TSny

I'm not sure what you are asking here. If you get a final answer, I can check to see if I get the same answer.

11. Feb 26, 2017

### Arman777

No I found the answer,Just For solving the integral.I used calculator.Then I put the numbers and I found the answer.

Just I couldnt see the Solution of integral.And asked you Is is bad to not solve such integral.Its stupid question I know :/

12. Feb 26, 2017

### TSny

I think it's OK to use a calculator to do the integral.

To do the integration without a calculator, note that $$\int \frac{dx}{\left(4x^2 + l^2+4z^2 \right)^{3/2}} = \frac{1}{8} \int \frac{dx}{\left(x^2 + a^2 \right)^{3/2}}$$ where $a^2 = \frac{l^2}{4}+z^2$. Let $u = \frac{x}{a}$ to put the integral into the form $$\frac{1}{8a^2} \int \frac{du}{\left(u^2 + 1\right)^{3/2}}$$ Then try an appropriate trigonometric substitution.