I have been given this question and would just like some hints for how to get started.
A system of charges consists of +2q at the origin and -q at the two points $(0, 0, a) $ and $(0, 0, -a)$. Show that the potential is given by:
$\phi(r, \theta) =\frac{q}{4\pi\epsilon_0}(\frac{2}{r}-\frac{1}{\sqrt{r^2+a^2-2racos\theta}}-\frac{1}{\sqrt{r^2+a^2+2racos\theta}})$
where r is the distance from the origin and $\theta$ is the polar angle of the field point. Any help is greatly appreciated.