# Find error in mathematical proof of electromagnetic fields

This is wrong but I can't figure out what is wrong, could someone help me find the errors. • The electric field at distance X is just an inverse function of $X^2$ isn't it? hyperphysics.phy-astr.gsu.edu/hbase/electric/elesph.html – Andy aka Feb 11 '17 at 20:03
• It would help a lot if you could write the question. Rho is given as surface charge, but you treat it as volume charge. What is it? – sweber Feb 11 '17 at 23:40
• $\bar r^{'}$ does not always line up with $\bar r$, so you cannot assign the same $\bar a_r$ to both of them. – rioraxe Feb 12 '17 at 0:22

What's missing here is the original question. But I guess it is something like

For a hollow sphere with radius $r_0$ and surface charge $\rho_s=1000C/m^2$ located at the origin of the coordinate system, find the electric field at a point $\vec{x}_0$ outside the sphere.

In general, you have two issues in your calculation.

First, it is a surface charge, and $dq$ does not depend on any $dr$, just $r^2_0$:

$$ds=r_0^2\sin\theta\,d\theta\,d\phi$$

$$dq=\rho_sr_0^2\sin\theta\,d\theta\,d\phi$$

So you'll only have to integrate over this two angles, too:

$$\iint...r_0^2\sin\theta\,d\theta\,d\phi$$

Second each small charge $dq$ located at a position $dr$ creates a tiny field at $\vec{x}_0$. Direction and strength depend on the distance between both:

$$\vec{R}=\vec{x}_0-\vec{r}$$

Of course, $r$ is different for each $dq$, and since you have chosen spherical coordinates, you have to express this in spherical coordinates, too:

$$\vec{r}=\begin{pmatrix}r\,\sin \theta \,\cos \varphi \\r\,\sin \theta \,\sin \varphi \\r\,\cos \theta \end{pmatrix}$$

With this, the integral is

$$\vec{E}(\vec{x}_0)=\iint\frac{1}{4\pi\varepsilon_0}\frac{\vec{R}}{|\vec{R}|^3}\,dq$$

$$=\iint\frac{1}{4\pi\varepsilon_0}\frac{\vec{R}}{|\vec{R}|^3}\cdot\rho_sr_0^2\sin\theta\,d\theta\,d\phi=\frac{\rho_sr_0^2}{4\pi\varepsilon_0}\iint\frac{\vec{R}}{|\vec{R}|^3}\sin\theta\,d\theta\,d\phi$$

Finally, should you really calculate the field this way? The integral is a bit nasty... Typically, one uses Gauß law plus geometry to get the well known result

$$\vec{E}(\vec{x}_0)=\frac{q}{4\pi\varepsilon_0}\frac{\vec{x}_0}{|\vec{x}_0|^3}$$

with

$$q=4\pi r_0^2\rho_s$$

EDIT: Lost the $\sin\theta$...