Understanding distances and unit vectors in this problem

A charge $$-q$$ is at $$x = -a$$ and a second charge $$+q$$ is at $$x = a$$

Between the charges, the contribution from each charge is in the negative direction.

An expression for $${\overrightarrow{E}} = \frac {kq}{(x-a)^2} \hat{{e_+}} + \frac{k(-q)}{(x+a)^2} \hat{{e_-}}$$ for $$-a< x< a$$

Where $$\hat{{e_+}}$$ is a unit vector that points away from the point $$x=a$$ for all values of $$x$$ (except $$x=a$$) and $$\hat{{e_-}}$$ is a unit vector that points away from the point $$x=-a$$ for all values of $$x$$.

The first thing I don't understand is that if you take any point between the origin of coordinates and $$a$$, the distance from $$a$$ to the point is $$x-a$$. But if you place that point to the left of the origin of coordinates the distance is not $$x-a$$ but $$x+a$$.

Then you can't have the expression $$\frac {kq}{(x-a)^2} \hat{{e_+}}$$ because if the point is to the right of the origin you have $$x-a$$, but if it is to left you have $$x+a$$.

Also I don't understand the explanation about the unit vectors here, $$\hat{{e_+}}$$ and $$\hat{{e_-}}$$

To try and explain how the equation was arrived at for $$-a< x, ie the centre region, I have drawn all the relevant unit vectors including those that have to do with the directions of the electric fields produced by the two charges $$\hat E_+$$ and $$\hat E_-$$.

Adding the two electric fields between the two charges with the individual fields being shown as a magnitude plus a direction.

$$\vec E_{\rm centre}= \frac{kq}{(a-x)^2}\, (-\hat x)\, + \, \frac{kq}{(a+x)^2}\, (-\hat x)$$

Noting that in the centre region $$-\hat x = \hat e_+ = - \hat e_-$$ and $$(a-x)^2 = (x-a)^2$$ you obtain the equation given in your question.

• I don't quite understand the direction of the red $\hat e_-$ vectors, as $-q$ would attract a positve test charge. And could you please explain with more detail how you derived $(a-x)^2$ and $(a+x)^2$? – sonny27 Aug 13 at 10:38
• The definition of the $e$ vectors relate to the positions of the charges. They point away from the defining charges and their definitions are not related to the directions of the electric fields. If the charge is $a$ from the origin then position $x$ is either $a-x$ from the charge or $a+x$ from the charge depending on whether the charge and position are on the same side as the origin or on opposite sides of the origin. – Farcher Aug 13 at 11:00
• Thanks. I'm stuck with the $a-x$ and $a+x$. Thinking about it. – sonny27 Aug 13 at 11:08
• Draw a diagram with $0<x<a$. – Farcher Aug 13 at 11:09
• I see what you mean. But for instance, if I take the charge $+q$, its equation is $\frac {kq}{(x-a)^2} \hat{{e_+}}$. For any $x$ away from $+q$, whether it is in the same side than the origin or in the opposite side, the distance should be $(x-a)$, because it is in its equation. But the fact, is that in the same side from the origin it is $(x-a)$, and in the opposite side it is $(x+a)$. That's what I don't understand. – sonny27 Aug 13 at 11:26