# Is this formula I derived for Potential Difference between two points in an electric field correct?

Let's assume that we have a positive charge $$Q$$ and a positive test charge $$q$$ is moved by an external agent from a point $$A$$ to $$B$$. The distance of $$Q$$ from $$A$$ is $$r_1$$ and from $$Q$$ to $$B$$ is $$r_2$$.

Let's say that the external agent moves $$q$$ from $$B$$ to $$A$$. It does some work while doing so. If it had moved the charge from a distance of $$r$$ to $$r+dr$$, where $$dr$$ is a very tiny distance, the work $$(dW)$$ would have been approximately equal to $$K_e\dfrac{Qq}{r^2}dr$$, where $$K_e$$ is Coulomb's Constant.

The sum of all these little 'works' will be the total work done by the external agent when it moves $$q$$ from $$B$$ to $$A$$, which will be : $$\int_{r_1}^{r_2} K_e \dfrac{Qq}{r^2}dr$$ [Note : If this is wrong, please correct it, I'm just a beginner to calculus]
The simplification of this integral, according to my Physics textbook is $$K_eQq \Bigg ( \dfrac{1}{r_1}-\dfrac{1}{r_2} \Bigg )$$

Now, this is the work done by the external agent when it moves $$q$$ from $$B$$ to $$A$$. The potential difference between two points in an electric field is defined to be the work done to move a unit charge from one point to the other. So, it would be equal to : $$\dfrac{\text{Work done}}{q} = K_eQ \Bigg ( \dfrac{1}{r_1} - \dfrac{1}{r_2} \Bigg )$$ I think that that should give the potential difference between two points in an electric field due to a charge $$Q$$.

Let me know if it's correct and if it isn't, why it's incorrect.