# Sign error in calculating the electric field of point charge

I have to determine the electric field of a point charge, I get a true result except for a sign. Here is my passages.

$$\nabla \cdot e = \frac{\rho}{\epsilon}$$

$$e = - \nabla u$$

$$\nabla^2 u = - \frac{\rho}{\epsilon}$$

$$\frac{1}{r^2}\ \frac{\partial}{\partial r}\ \lgroup r^2 \frac{\partial u}{\partial r}\ \rgroup = -\frac{q}{\epsilon}\ \delta(r)$$

$$r^2 \frac{\partial u}{\partial r}\ = 0 \Rightarrow u(r) = \frac{f(r)}{r} \Rightarrow \frac{\partial u}{\partial r} = \frac{f'(r)}{r}-\frac{f(r)}{r^2}$$

$$\frac{\partial}{\partial r}\ \left( r^2 \frac{\partial u}{\partial r}\ \right) = \frac{\partial}{\partial r}\ \left( f'(r)r - f(r) \right( = rf''(r) = 0 \Rightarrow f(r) = Ar + B$$

$$u(r) = A + \frac{B}{r}$$

Now I set $A = 0$ to find $B$.

$$\int _V \nabla \cdot \nabla u \,\,\, dV = \int _{\partial V} \nabla u\,\, i_n dS = \int _{\partial V} - \frac{B}{r^2} \,\, dS = - \frac{B}{r^2} 4\pi r^2 = - \frac{q}{\epsilon}$$

$$B = \frac{q}{4 \pi \epsilon} \Rightarrow u(r) = \frac{q}{4 \pi \epsilon r} \Rightarrow e(r) = - \frac{q}{4 \pi \epsilon r^2}$$

How is possible that the module of the electric field is negative?

Thanks to Ruslan I get the answer. In Spherical coordinates, if we consider only $r$ $$\nabla u = \partial _r u(r) \hat{r}$$
Could you expand on how you calculated $e(r)$ from $u(r)$? Also, you seem to have missed $r$ in denominator of $u(r)$ in the last equation. Currently $e(r)$ you show is just a $\partial_r u(r)$ instead of the $|-\nabla u|$ calculated in spherical coordinates. – Ruslan Aug 6 '14 at 9:35
Yes, I missed r in denominator of u(r); I have seen on wikipedia that in spherical coordinates $$-\nabla u = \partial _r u(r)$$ if we consider only the r. Here's the link en.wikipedia.org/wiki/… – Gnamm Aug 6 '14 at 9:41
There's no minus in wikipedia in "Gradient" row. You should have $-\nabla u=-\partial_r u(r)\hat{\boldsymbol r}$ instead. – Ruslan Aug 6 '14 at 9:43