# Electric Field of Bar [closed]

Problem: Positive charge $+Q$ is distributed uniformly along the positive $x$ axis from $x = 0$ to $x = a$. Negative charge $-Q$ is distributed along the $-x$ axis from $x = 0$ to $x = -a$. A point charge $+q$ is on $(0,y)$. Find the force that the positive and negative charge distributions exert on the point charge.

My (Wrong) Solution: We only consider the positive charges. Let $\sigma$ denote the charge density on the section. $\sigma = \dfrac{Q}{a}$. Then, the charge on a segment is $dQ = \sigma \hspace{1mm} dx = \dfrac{Q}{a} dx$. Plugging all this into the differential form of the formula for electric field, $$dE = \frac{k\dfrac{Q}{a}\,dx}{x^2+y^2}.$$ After drawing a diagram, we see that the $y-$component cancels out from both the positive and negative charges. Hence, we write $$dE_x = \frac{k\dfrac{Q}{a}\,dx}{x^2+y^2} \cdot \frac{a}{\sqrt{x^2 + y^2}} = \frac{k{Q}\,dx}{(x^2+y^2)^\frac{3}{2}}.$$ Then, we integrate as such $$\int^{a}_{0}dE_x = \frac{kQa}{y^2\sqrt{a^2 + y^2}}.$$ As the x components are the same for both the negative and positive charges and they add up in the negative x direction, the total force is $$F = \frac{2kQq}{y^2\sqrt{a^2 + y^2}}$$ in the $-x$ direction.

However, the correct answer is $$\frac{2qQ}{a}\left(\frac{1}{y} - \frac{1}{\sqrt{a^2 + y^2}}\right).$$

What have I done wrong in the calculations I've done in my attempt to solve the problem?

• Well I've made my question and my problem solving effort more apparent in my edited post. Jun 26, 2016 at 18:22

When you calculated $dE_x$, you multiplied by $\frac{a}{\sqrt{x^2+y^2}}$. Why? Hint: try $\frac{x}{\sqrt{x^2+y^2}}$