# Components of electric field deriving from potential equetion [closed]

My question is abut finding components of electric field from potential function. $V=\frac{1}{4\pi\epsilon_0}\frac{\vec{p}\cdot\vec{r}}{r^3}$ (1)

I can write it as $V=\frac{1}{4\pi\epsilon_0}\frac{pz}{r^3}$ (2)

By taking partial derivative

$\vec{E_x}=\frac{\partial{V}}{\partial{x}}$

$\vec{E_x}=\frac{pz}{4\pi\epsilon_0}\frac{\partial\frac{1}{r^3}}{\partial{x}}$

$\vec{E_x}=\frac{pzx\hat{x}}{4\pi\epsilon_0r^3}$

So is $\vec{E_y}$

$\vec{E_y}=\frac{pzx\hat{y}}{4\pi\epsilon_0r^3}$

However

$\vec{E_z}=\frac{p}{4\pi\epsilon_0}\frac{\partial{\frac{z}{r^3}}}{\partial{z}}$

$\vec{E_z}=\frac{p}{4\pi\epsilon_0}\left[\frac{3z^3}{r^3}-\frac{1}{r^3}\right]$

Here I get $\vec{E}=\frac{1}{4\pi\epsilon_0r^3}\left(3pz\vec{r}-p\hat{z}\right)$

But i am supposed to find

$\vec{E}=\frac{1}{4\pi\epsilon_0r^3}\left(\frac{3\left(\vec{p}\cdot\hat{r}\right)}{r^2}-\vec{p}\right)$

What is my mistake here? I tried but could not see. By the war from (1) to (2) $\vec{p}\cdot\vec{r}=pr\cos{\alpha}$

$\cos{\alpha}=\frac{z}{r}$

## closed as off-topic by ACuriousMind♦, Bill N, John Rennie, Danu, Kyle KanosMar 23 '16 at 10:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – ACuriousMind, Bill N, John Rennie, Danu, Kyle Kanos
If this question can be reworded to fit the rules in the help center, please edit the question.

• Right before i wrote" Here i get" that 3z^3 is not the case but 3z^2 instead? – user96369 Mar 22 '16 at 22:52
• I would recommend using the spherical gradient instead of the Cartesian one: $\nabla =\hat{r} \frac{\partial}{\partial r} + \hat{\theta} \frac{1}{r} \frac{\partial}{\partial \theta} + \hat{\phi} \frac{1}{r \sin{\theta}} \frac{\partial}{\partial \phi}$ – JoDraX Mar 22 '16 at 23:14
• There's something wrong with your "supposed to find" expression, because in the parentheses, you have a vector subtracted from a scalar. – Brionius Mar 22 '16 at 23:28
• Hi and welcome to the Physics SE! Please note that this is not a homework help site. Please see this Meta post on asking homework questions and this Meta post for "check my work" problems. – John Rennie Mar 23 '16 at 6:20