This may seem like a physics question but I am trying to solve it from a mathematics book actually. An electric dipole is given as:
$$\psi(\overrightarrow r) = \frac{\overrightarrow p ⋅ \overrightarrow r}{4\pi\epsilon_0r^3} $$
Now I need to prove that
$$\overrightarrow ∇\psi(\overrightarrow r) = \frac{\overrightarrow p - 3\hat{r}(\overrightarrow p ⋅ \hat r)}{4\pi\epsilon_0r^3}$$
I used $∇$ in spherical coordinates and put $\overrightarrow r = r × \hat{r}$. No matter what I do I can only find
$$ \overrightarrow ∇\psi(\overrightarrow r) = \frac{-3\overrightarrow p}{4\pi\epsilon_0r^3}$$
Could you please help me with this? Thank you very much in advance!!
To reduce some of the visual clutter in the problem statement, define 2 new variables $$\eqalign{ a &= \frac{p}{4\pi\epsilon_0} \cr \lambda &= \|r\| \cr }$$ Note that $$\eqalign{ \lambda^2 &= r\cdot r \cr \lambda\,d\lambda &= r\cdot dr \cr\cr }$$ Write the function in terms of these new variables, then find its differential and gradient $$\eqalign{ \psi &= \frac{a\cdot r}{\lambda^3} \cr \cr d\psi &= \frac{a\cdot dr}{\lambda^3} -\frac{3(a\cdot r)\,d\lambda}{\lambda^4} \cr &= \frac{a\cdot dr}{\lambda^3} -\frac{3(a\cdot r)\,(r\cdot dr)}{\lambda^5} \cr &= \frac{a-(3a\cdot{\hat r})\,{\hat r}}{\lambda^3}\cdot dr \cr \cr \nabla\psi &= \frac{a-(3a\cdot {\hat r})\,{\hat r}}{\lambda^3} \cr &= (I-3{\hat r}{\hat r})\cdot a\lambda^{-3} \cr\cr }$$