<s>[INST] Taylor series for $1/|R-r|$ I'm questioning all my math knowledge because somehow I don't end on the same textbook result.
Here is what I mean: Expanding
$$ \dfrac{1}{|R-r|} = \dfrac{1}{R}\,\dfrac{1}{\sqrt{1+ \frac{r^2}{R^2} - 2\,\frac{R\,r}{R^2}}}\quad \text{where} \quad R = [X,Y,Z] \quad r = [x,y,z]$$
Now for $r \ll R$ defining  a small quantity $\delta = \frac{r^2}{R^2} - 2\,\frac{R\,r}{R^2}$ and expanding with respect to $\delta$ at $\delta = 0$:
$$\dfrac{1}{\sqrt{1 + \delta}} \approx 1 - \dfrac{1}{2}\,\delta + \dfrac{3}{8}\,\delta^2$$
Here is where the struggle begins: plugging $\delta$ back in, I receive:
$$\dfrac{1}{|R-r|} \approx\dfrac{1}{R}\,\left(1 - \dfrac{r^2}{2\,R^2} + \dfrac{R\,r}{R^2} + \dfrac{3}{8}\left(\,\dfrac{r^2}{R^2}- 2\,\dfrac{R\,r}{R^2}\right)^2\right)$$
At this point the textbook as well as all resources I sought for simplified this straight to:
$$\dfrac{1}{|R-r|} \approx\dfrac{1}{R}\,\left(1 - \dfrac{r^2}{2\,R^2} + \dfrac{R\,r}{R^2} + \dfrac{3}{2}\left(\,\dfrac{R\,r}{R^2}\right)^2\right)$$
How in the world of Mathematics is this possible?
 [/INST] Hint:
You almost there! Just expand $\left(\frac{r^2}{R^2}-\frac{2Rr}{R^2}\right)^2$ and then the terms $\left(\frac{r}{R}\right)^3$ and $\left(\frac{r}{R}\right)^4$ may be negligible.
</s>