#### Two charges $-q$ each are separated by distance 2d. A third charge $+q$ is kept at midpoint O. Find potential energy of  $+q$ as a function of small distance x from O due to $-q$ charges. Sketch PE versus x and convince yourself that the charge at O is in an unstable equilibrium.

In the above figure, $+q$ charge is at a point away from O towards $\left ( -d,0 \right )$.

This can be written as

$U=q\left ( V_{1}+V_{2} \right )=q\frac{1}{4\pi\; \varepsilon _{0}}[\frac{-q}{\left ( d-x \right )}+\frac{-q}{d+x}]$

$U=\frac{1}{2\pi\varepsilon _{0}}\frac{-q^{2}d}{d^{2}-x^{2}}$

At x=0;

$U=\frac{1}{2\pi\varepsilon _{0}}\frac{q^{2}}{d}$

If we differentiate both sides of the equation with respect to x, we get

$\frac{dU}{dx}>0,$ when $x<0$

and $\frac{dU}{dx}<0,$ when $x>0$

With the help of this two, we can assume that the charge on the particle to be

$F=\frac{-dU}{dx}$

Hence, $F=\frac{-dU}{dx}=0$

When

a) $\frac{d^2U}{dx^{2}}$ = positive, equilibrium is stable

b) $\frac{d^2U}{dx^{2}}$ = negative, equilibrium is unstable

c) $\frac{d^2U}{dx^{2}}=0$, equilibrium is neutral

Therefore, when

$x=0,\frac{d^2U}{dx^{2}}=\left ( \frac{-2dq2}{4\pi\varepsilon _{0}} \right )\left ( \frac{1}{d^{6}} \right )\left ( 2d^2 \right )<0$

Which shows that the system is an unstable equilibrium.