Why $\nabla f = O(\frac{1}{|x|^2})$? For $x \in \mathbb{R}^2$, let
$$ f(x) = \log |x| - \log |x - 2e_2|, $$
where $e_2 = (0,1)^T$ is the standard unit vector.
It is said that the second logarithm term above is to ensure that $\nabla f$ has better decay at $x = \infty$, namely $\nabla f = O(\frac{1}{|x|^2})$. I think it has something to do with the expansion of $\nabla f$, but I don't quite get it.
Can someone please help me?
Thank you very much.
 A: I thought it might be useful to present a way forward that admits a general approach.  To that end, we proceed.
Using the binomial theorem we can write 
$$\begin{align}
\frac{1}{|\vec x-2\hat e_2|^2}&=\left((\vec x-2\hat e_2)\cdot (\vec x-2\hat e_2)\right)^{-1}\\\\
&=\left(|\vec x|^2 -4\hat e_2\cdot \vec x+4\right)^{-1}\\\\
&=\frac{1}{|\vec x|^2}\left(1-4\frac{\hat e_2\cdot \hat x}{|\vec x|}+4\frac{1}{|\vec x|^2}\right)^{-1}\\\\
&=\frac{1}{|\vec x|^2}\left(1+4\frac{\hat e_2\cdot \hat x}{|\vec x|}+O\left(\frac{1}{|\vec x|^2}\right) \right)\\\\
&=\frac{1}{|\vec x|^2}+4\frac{\hat e_2\cdot \hat x}{|\vec x|^3}+O\left(\frac{1}{|\vec x|^4}\right)\tag1
\end{align}$$
Therefore, for $f=\log(|\vec x|)-\log(|\vec x-2\hat e_2|)$, use of $(1)$ reveals that
$$\begin{align}
\nabla f&=\frac{\vec x}{|\vec x|^2}-\frac{\vec x-2\hat e_2}{|\vec x-2\hat e_2|^2}\\\\
&=\frac{\vec x}{|\vec x|^2}-\left(\vec x-2\hat e_2 \right)\left(\frac{1}{|\vec x|^2}+4\frac{\hat e_2\cdot \hat x}{|\vec x|^3}+O\left(\frac{1}{|\vec x|^4}\right)\right)\\\\
&=\color{blue}{\underbrace{2\frac{\hat e_2}{|\vec x|^2}-4\frac{(\hat e_2\cdot\hat x)\hat x}{|\vec x|^2}}_{=O\left(\frac{1}{|\vec x|^2}\right)}}+O\left(\frac{1}{|\vec x|^3}\right)\\\\
&=O\left(\frac{1}{|\vec x|^2}\right)
\end{align}$$
as was to be shown!
