See Our New JEE Book on Amazon
The electric potential of a point charge $q$ at a distance $r$ from it is given by
\begin{align} V(r)=\frac{q}{4\pi\epsilon_0 r} \end{align}The potential difference between two points separated by $\mathrm{d}\vec{r}$ in an electric field $\vec{E}$ is given by
\begin{align} \mathrm{d}V=-\vec{E}\cdot\mathrm{d}\vec{r} \end{align}Integrate to get the potential at a point $\vec{r}$ as
\begin{align} V(\vec{r})=-\int_{\infty}^{\vec{r}}\vec{E}\cdot\mathrm{d}\vec{r} \end{align}Problem (IIT JEE 2008): Consider a system of three charges $\frac{q}{3}$, $\frac{q}{3}$ and $-\frac{2q}{3}$ placed at points A, B and C, respectively, as shown in the figure. Take O to be the centre of the circle of radius $R$ and angle $\text{CAB}={60}\;\mathrm{degree}$.
Solution: The charges at A, B, and C are $q_A=q/3$, $q_B=q/3$, and $q_C=-2q/3$. The electric field at O due to $q_A$ and $q_B$ is equal in magnitude but opposite in direction. Thus, resultant electric field at O is by the charge $q_C$ and it is given by \begin{alignat}{2} \vec{E}_O=-\frac{q}{6\pi\epsilon_0 R^2}\;\hat\imath. \nonumber \end{alignat} The triangle ABC is right-angled with $\angle A={60}\;\mathrm{deg}$, $\angle C={90}\;\mathrm{deg}$, and $r_\text{AB}=2R$. Thus, $r_\text{AC}=R$ and $r_\text{BC}=\sqrt{3}R$. The potential energy for given charge distribution is \begin{alignat}{2} U&=\frac{1}{4\pi\epsilon_0}\left[ \frac{q_A q_B}{r_\text{AB}}+\frac{q_A q_C}{r_\text{AC}}+\frac{q_B q_C}{r_\text{BC}}\right] \nonumber\\ &=\frac{1}{4\pi\epsilon_0} \left[\frac{q^2}{18R}-\frac{2q^2}{9R}-\frac{2q^2}{9\sqrt{3}R}\right]\neq 0. \nonumber \end{alignat} The magnitude of force between $q_C$ and $q_B$ is \begin{align} F_\text{BC}&=\frac{1}{4\pi\epsilon_0}\frac{q_B q_C}{r_\text{BC}^2}\\ &=\frac{q^2}{54\pi\epsilon_0 R^2}. \end{align} The potential at O is \begin{align} V=\frac{1}{4\pi\epsilon_0}\left(\frac{q_A}{R}+\frac{q_B}{R}+\frac{q_C}{R}\right)=0. \end{align}