How can I see mathematically with Feynman rules of QED that same charges repel and opposite charges attract? I'm trying to 'prove' that electrons repel each other and electrons-positrons attract each other, but I'm not sure what I should be looking at. My guess is that there should be a different sign when calculating the matrix element corresponding to a Feynman diagram, however I'm not sure I'm using Feynman rules properly since my two diagrams have the same signs.
The Feynman rules for QED that I've been taught (there may be some different sign conventions) are:
$$-ie \gamma^\mu \quad \text{for the only QED vertex}$$
$$\frac{-i g_{\mu \nu}}{p^2} \quad \text{for photon propagator}$$
Now I try to compute the matrix elements for the following diagrams:


And I get:
$$ e^-e^- \rightarrow e^-e^- \implies 
   u(p_1) (-i e \gamma^\mu)\bar{u}(p_3) \frac{-i g_{\mu \nu}}{t} u(p_2) 
(-i e \gamma^\nu)\bar{u}(p_4) =$$
$$ = +ie^2 u(p_1) \gamma^\mu \bar{u}(p_2) 
\gamma_\mu \bar{u}(p_4)  $$
$$ e^+e^- \rightarrow e^+e^- \implies 
   \bar{v}(p_1) (-i e \gamma^\mu)v(p_3) \frac{-i g_{\mu \nu}}{t} u(p_2) 
(-i e \gamma^\nu)\bar{u}(p_4) =$$
$$ = +ie^2 \bar{v}(p_1) \gamma^\mu v(p_3) u(p_2) 
\gamma_\mu \bar{u}(p_4)  $$
It seems to me that there should be at least a different sign between the two, but I'm really not sure what I should be looking at. Does the $-ie\gamma^\mu$ rule depend on what kind of particle anti-particle I'm using? Because the vertices here are not exactly the same (in the $e-e+$ case, one has two electrons while the other has two positrons).
 A: One method is to look at the interaction energy between two charges sources. This can be derived from the path integral
\begin{equation}
Z[J] = e^{i W[J]} = \int DA_\mu e^{i \int d^4 x \left(-\frac{1}{4} F^{\mu\nu}F_{\mu\nu} + A_\mu J^\mu\right)}
\end{equation}
The integral can be done exactly by completing the square because it is a Gaussian integral and yields
\begin{equation}
W[J] = -\frac{1}{2} \int d^4 x \int d^4 y J^\mu(x) G_{\mu\nu}(x, y) J^\nu(y)
\end{equation}
where the propagator is
\begin{equation}
G_{\mu\nu} = \frac{\eta_{\mu\nu}}{\square - i \epsilon} = \int \frac{d^4 p}{(2\pi)^4}\frac{\eta_{\mu\nu} e^{i p_\mu (x^\mu-y^\mu)}}{p^2 - i \epsilon}
\end{equation}
There is a subtlety here because of gauge invariance. Strictly speaking, one cannot invert the differential operator $O_{\mu\nu}=\partial_\mu\partial_\nu - \eta_{\mu\nu} \square$ that appears in the action, meaning that using the standard formula for a Gaussian integral is illegal (since it depends on the inverse of $O$). However, if we stick to sources which are conserved, with $\partial_\mu J^\mu=0$, then we restrict to a subspace where we can invert $O$. One way to see this is that in other gauges, you get a term like $p_\mu p_\nu$ in the propagator, but if $J$ is conserved then the Fourier transform $\tilde{J}$ obeys $p_\mu \tilde{J}^\mu=0$ and those gauge-dependent terms don't contribute to $W[J]$.
$W[J]$ is related to the interaction energy between the sources $J$ by (for example, see Section 1.4 of Zee's textbook, especially near Eq 6)
\begin{equation}
W = - E T
\end{equation}
where $T$ is the time interval of the experiment. Therefore the sign of $W$ determines whether the interaction energy is attractive or repulsive. If the energy between two like charges is negative then the force will be attractive, and if it is positive then the force will be repulsive.
We can factor the $\eta_{\mu\nu}$ factor out of the integral. For two static point charges with the same charge $q$ at positions $\vec{x}_1$ and $\vec{x}_2$, we have
\begin{equation}
J^0(x) = q\left(\delta^3(\vec{x}-\vec{x}_1) + \delta^3(\vec{x}-\vec{x}_2)\right), \ \ J^i(x) = 0 
\end{equation}
and the interaction energy becomes
\begin{equation}
E = \left(q^2 \eta_{00}\right) \times \left[ - \int \frac{d^3 p}{(2\pi)^3} \frac{e^{i \vec{p} \cdot (\vec{x}_1 - \vec{x}_2)}}{\vec{p}^2} \right]
\end{equation}
The term in brackets is negative -- again see Zee's book. Therefore, the overall energy is positive, because the term in square brackets is multiplied by $\eta_{00}=-1$. This indicates that the force between like charges is repulsive. We also see that for opposite sign forces, the last term would yield a minus sign (because $J^0$ for the two charges would have opposite signs), yielding to an attractive force.
An important conclusion from this analysis is that Lorentz invariance is crucial for determining whether the force is attractive or repulsive, because of the factor of $\eta_{\mu\nu}$. This factor is missing for scalar fields, which is why scalars give rise to attractive forces, and this factor effectively appears squared for gravity because of the spin-2 nature of the graviton, which is why gravity is universally attractive.
A: Your question is a very good one, and not easy to answer.
Feynman diagrams are tools for calculating scattering cross sections (and maybe decay rates). The cross sections for like-sign and unlike-sign scattering are the same to first order, so the calculations you're doing are indeed going to give the same answer.  (This is also true of classical Rutherford scattering, btw).
To see a difference you have to go to second order and consider the exchange of two photons, and the interference term
between one-photon and two-photon exchange, which is down by a factor $\alpha$ from the leading term but contains a $(\pm e)^3$ factor which
makes a (small) difference between the like and unlike-sign cross sections.
How you would interpret this as 'attraction' or 'repulsion' I'm not sure.
Moral: Feynman diagrams are really useful, but they're not everything.
