# Can't get correct sign of electric potential of dipole

We have a dipole and I need to find $$V(x)$$ for $$x<-d$$ First I calculate the potential at some point $$A=(x,0)$$ relative to $$P = (-\infty, 0)$$ of the $$-Q$$ charge as follows $$\int_A^P\vec {E} \cdot \vec {dl}=\int_A^P\frac{Q\vec i}{4\pi\epsilon_0(-d-x)^2}dx(-\vec i)=-\frac{Q}{4\pi\epsilon_0}\int_A^P\frac{dx}{(d+x)^2}=\frac{Q}{4\pi\epsilon_0}\frac{1}{d+x}\biggr |_A^P=$$ $$= -\frac{Q}{4\pi\epsilon_0}\frac{1}{d+x}= V(x)$$

And then I repeat the same procedure for the $$+Q$$ charge and then add the potentials up. I get the right functional form but my sign is reversed so I get that the potential for $$x < -d$$ is actually positive when it's not. However, I just can't find what am I doing wrong.

The equation that I get for the potential by the $$+Q$$ charge is $$V_{+Q}(x)=-\frac{Q}{4\pi\epsilon_0}\frac{1}{d-x}$$

The right answer should be $$V(x) = -\frac{2Qd}{4\pi\epsilon_0(x^2-d^2)}$$ but I repeatedly fail to obtain the minus sign in front.