In my book it says:
We can choose a convenient reference by noting that the coulomb force at infinite distance is zero. It makes sense for this case, then, to choose $r=\inf$ as the vacuum level $E_v$: $E_p(r=\inf)=E_v$ (In here, p means potential)
When the nuclei are allowed to approach each other, an electron would be influenced by both nuclei according to Coulomb's law. The electron potential energy of a single electron (in $H^+_2$ ) at any point is now
$E_p=E_v-\frac{q^2}{(4\pi\epsilon_0)r^2_1}-\frac{q^2}{(4\pi\epsilon_0)r^2_2} $
where $r_1$ and $r_2$ are the distances between the electron and each of the two nuclei, respectively.
But i can't understand. As i know, the potential energy's formula is $E_p=\int_C\vec{F}\bullet\vec{dr}$
And, by superposition, we can get $E_p=E_1+E_2=\int_C(\vec{F}_1+\vec{F}_2)\bullet\vec{dr}$
where $\vec{F_1}$ and $E_1$ are force and potential energy due to one charge. And $\vec{F_2}$,$E_2$ are due to other charge.
So i think, $E_1=E_v-\frac{q^2}{(4\pi\epsilon_0)r^2_1} $,$E_2=E_v-\frac{q^2}{(4\pi\epsilon_0)r^2_2} $
Thus, it think $E_p=2E_v-\frac{q^2}{(4\pi\epsilon_0)r^2_1}-\frac{q^2}{(4\pi\epsilon_0)r^2_2} $, not $E_p=E_v-\frac{q^2}{(4\pi\epsilon_0)r^2_1}-\frac{q^2}{(4\pi\epsilon_0)r^2_2} $
What am I misunderstanding?