I have read many books on Mechanics and Electrodynamics and the one thing that has confused me about electrostatic potential energy is its derivation .One of the classical derivations is :
$$\newcommand{\newln}{\\&\quad\quad{}} \begin{align}&\int^{r_b}_{r_a}\mathbf{\vec{F}}\cdot d\mathbf{\vec{r}}=-(U_a-U_b) \newln \Rightarrow \int^{r}_{\infty}\mathbf{\vec{F}}\cdot d\mathbf{\vec{r}}=-(U_r-U_\infty) \newln \Rightarrow \int^{r}_{\infty}\mathbf{\vec{F}}\cdot d\mathbf{\vec{r}} =-U_r ~~~~~~~ [U_\infty = 0]\newln \Rightarrow \int^{r}_{\infty}k\cdot\frac{q.q_o}{r^2}d\mathrm{\mathbf{r}}=-U_r ~~~~~~~ [\textrm{Coulomb's Law}]\newln \Rightarrow kq\cdot q_o\int^{r}_{\infty}\frac{1}{r^2}d\mathbf{r}=-U_r\newln \Rightarrow kq\cdot q_o\left[\frac{-1}{r} \right]^r_\infty=-Ur\newln\Rightarrow \frac{-kq.q_o}{r}=-U_r\newln \Rightarrow U_r=\frac{kq.q_o}{r} \end{align} $$
My problem is in the fourth line of the derivation. shouldn't there be a $Cos\theta$ term there as it is a dot product.But using it would change the resulting equation to have an extra $Cos \theta$ term being multiplied to it.Why is it not used ? . The direction of the forces have to be defined right?
One more thing - In the derivation it is finally said that the result is sign sensitive but isn't the equation of Coulombic force just for the magnitude?Then how come the result is sign sensitive.
Could Some One give me or direct me to a definition and a derivation that caters to these querrys?
EDIT:
[I saw the proof on Wikipedia it has some thing on my doubt but doesnt seen to use it.It uses cos theta but i cant seem to understand why they used only $\pi$ and not $2\pi$]
[I know that $Cos\theta$ can be either +1 or -1 depending on the polarity of the charges and that it will be a constant but doing that will change the result altogether : How? :]
- If in the original result you put similar charges you get a positive result .
- But in this case if you have similar signs then the cos theta would be -1 as the displacement and the force of repulsion would be anti-paralell.