m\frac{v^2}{2}=\int_0^{x_{A}}{\frac{k}{\sqrt{x^2+d^2}}\cdot\frac{x}{d}dx