# Deriving potential of Continuous charge distribution using Vector Calculus

I was reading Classical Electrodynamics by J.D Jackson and stuck at a point. He considers the potential due to a dipole with charge density $$\sigma$$ and distance between then d such that: $$\lim_{n\to\infty} \sigma(\bf x')\vec d= \vec D$$

Now consider diagram below,showing coordinates. One surface is positive and another is negative. He then considers evaluating potential function:

$$\phi =\int{ \frac{\sigma(\bf x')}{|\bf x-\bf x'|}da' }-\int{ \frac{\sigma(\bf x')}{|\bf x-x'+\vec n d|}}$$

Where $$\bf x$$ is the point where we are calculating potential. Now he considers $$d<<|\bf x-\bf x'|$$,the usual approximation. Now using binomial expansion: $$\frac {1}{\bf |x-x'+\vec n d|}= \frac {1}{\bf |x-x'|} -\frac { \bf \vec nd.(\vec \bf (x-x')}{\bf|\vec (x-x')|}$$

My problem comes at next step. He substitutes this expansion in potential function and arrives at(Eq 1.25 in picture):

$$\phi = \int{\vec D. \nabla' \frac{1}{\bf |x-x'| }da'}$$

Can you justify this last formula? Please be detail.

First of all the first order term in the expansion should be: $$-\frac{d\bf{n}.(\bf{x}-\bf{x'})}{|\bf{x}-\bf{x'}|^3}$$ (notice the 'to the power three' in the denominator)
As pointed out in the book this can be written as: $$-d\bf{n}.\nabla'(\frac{1}{|\bf{x}-\bf{x'}|})$$ just try it out (you should get two minus signs in taking this derivative).