Theorem: Shell Theorem

Let $P$ be a charged particle in space.
Let $P$ generate a field whose vector quantity $\mathbf F$ at a position $\mathbf r$ {{WRT}} $P$ is given by the inverse square law:
:$\mathbf F = \dfrac {k Q} {r^2} \hat {\mathbf r}$
where:
:$\mathbf F$ is the vector field quantity
:$r := \size {\mathbf r}$ denotes the magnitude of $\mathbf r$, that is, the distance from $P$
:$k$ is a constant
:$Q$ is the charge that generates the field, for example:
:::mass for gravity
:::electric charge for electrostatic fields
::and so on.
Then the field generated by a uniform spherical shell of radius $R$ and the same charge $Q$ at a position $\mathbf r$ {{WRT}} its center is given by two cases:
:$(1): \quad$ Outside the shell, the field is identical to that of $P$.
:$(2): \quad$ Inside the shell, the field is $\mathbf 0$.

Proof:
thumb600pxalt=The diagram shows a [[Definition:Sphere (Geometry)spherical shell centered at $C$ and with radius $R$ with a charge $Q$ distributed uniformly over its surface. The field from the charged shell will be measured at position vector $\mathbf r$ at a distance $r$ from $C$. A thin strip on the surface of the sphere whose radius is perpendicular to the line joining $C$ and r is shaded. The symbol $\theta$ measures the angle from a point on the strip to the shell center $C$ to the position $\mathbf r$. The strip has a radius $R \sin \theta$ and width $R \rd \theta$. The symbol $phi$ is the angle from a point on the strip to position $\mathbf r$ to the spherical shell center $C$. The distance from the position $\mathbf r$ to a point on the strip is labeled $\mathbf r'$.|A spherical shell centered at $C$ and with radius $R$ has charge $Q$ distributed uniformly over its surface. The field from the charged shell will be measured at $\mathbf r$ at a distance $r$ from $C$. A thin strip on the surface of the sphere whose radius is perpendicular to the line joining $C$ and $\mathbf r$ is shaded and has a radius $R \sin \theta$ and width $R \rd \theta$.]]
We have a spherical shell centered at $C$ with a radius $R$.
We have that the total charge of the spherical shell is $Q$, which is distributed uniformly over the surface with a charge density of
:$(1): \quad \sigma = \dfrac Q {4\pi R^2}$
from the Surface Area of Sphere.
We also have a point $\mathbf r$ at a distance of $r = \size {\mathbf r}$ from the center of the sphere.
The shaded strip is an infinitesimally thin ring perpendicular to the line joining $C$ and $\mathbf r$.
We have that every line from the sphere center $C$ to a point on the strip makes an angle $\theta$ with the line joining $C$ to $\mathbf r$.
Therefore,
* The radius of this strip is $R \sin \theta$.
* The distance of the center of this strip to the center of the sphere is $R \cos \theta$.
The distance from the point $\mathbf r$ to a point on the strip is $r'$.
The field at point $\mathbf r$ due to the whole surface of the spherical shell is found by integrating over the surface of the strip, followed by integrating over all of the strips defined by $\theta \in \closedint 0 \pi$:
{{begin-eqn}}
{{eqn | l = \mathbf F
      | r = \iint_{\textrm {shell} } \frac {k \rd Q} {r'^2} \mathbf {\hat r}'
}}
{{eqn | r = \int_0^\pi \oint_{\textrm {ring} } \frac {k \rd Q} {r'^2} \mathbf {\hat r}'
}}
{{eqn | r = k \int_0^\pi \frac 1 {r'^2} \oint_{\textrm {ring} } \d Q \mathbf {\hat r}'
      | c = Linear Combination of Integrals and $r'$ is constant over ring.
}}
{{end-eqn}}
where the outer integral is over $\theta$ and the inner integral is around the ring of the strip.
By rotational symmetry about the line from $C$ to $\mathbf r$, the field perpendicular to that line is zero.
This leaves only the part of the field parallel to that line.
{{begin-eqn}}
{{eqn | l = \mathbf F
      | r = k \int_0^\pi \frac 1 {r'^2} \oint_{\textrm {ring} } \d Q \hat {\mathbf r} \cos \phi
}}
{{eqn | r = k \hat {\mathbf r} \int_0^\pi \frac {\cos \phi} {r'^2} \oint_{\textrm {ring} } \d Q
      | c = $\hat {\mathbf r}$ is constant and $\phi$ is constant over the ring.
}}
{{end-eqn}}
where $\phi$ is the angle from the point on the ring to $\mathbf r$ to the center $C$.
The width of the strip takes up an angle of $\d \theta$.
So, the width of the strip is the Arc Length of Sector $R \d \theta$.
Therefore, the area of the strip is its length times its width:
{{begin-eqn}}
{{eqn | l = \d A
      | r = \paren {2 \pi R \sin \theta} \paren {R \rd \theta}
}}
{{eqn | r = 2 \pi R^2 \sin \theta \rd \theta
}}
{{end-eqn}}
Therefore, the charge of the strip is $\sigma$ times the area of the strip:
:$\ds \oint_{\textrm {ring} } \d Q = 2 \pi R^2 \sigma \sin \theta \rd \theta$
The field integral now simplifies to
{{begin-eqn}}
{{eqn | l = \mathbf F
      | r = k \hat {\mathbf r} \int_0^\pi \frac {\cos \phi} {r'^2} \oint_{\textrm {ring} } dQ
}}
{{eqn | r = 2 \pi R^2 \sigma k \hat {\mathbf r} \int_0^\pi \frac {\cos \phi \sin \theta} {r'^2} \rd \theta
}}
{{eqn | r = \frac {k Q} 2 \hat {\mathbf r} \int_0^\pi \frac {\cos \phi \sin \theta} {r'^2} \rd \theta
      | c = From $(1)$
}}
{{end-eqn}}
By the Pythagorean Theorem, we have
{{begin-eqn}}
{{eqn | l = r'^2
      | r = \paren {r - R \cos \theta}^2 + R^2 \sin^2 \theta
}}
{{eqn | r = r^2 - 2 r R \cos \theta + R^2 \cos^2 \theta + R^2 \sin^2 \theta
}}
{{eqn | r = r^2 - 2 r R \cos \theta + R^2
      | c = Sum of Squares of Sine and Cosine
}}
{{end-eqn}}
Therefore,
{{begin-eqn}}
{{eqn | l = \mathbf F
      | r = \frac {k Q} 2 \hat {\mathbf r} \int_0^\pi \frac {\cos \phi \sin \theta \rd \theta} {r^2 - 2 r R \cos \theta + R^2}
}}
{{end-eqn}}
From the diagram, we have
{{begin-eqn}}
{{eqn | l = \cos \phi
      | r = \frac {r - R \cos \theta} {r'}
}}
{{eqn | r = \frac {r - R \cos \theta} {\sqrt {r^2 - 2 r R \cos \theta + R^2} }
}}
{{end-eqn}}
Therefore,
{{begin-eqn}}
{{eqn | l = \mathbf F
      | r = \frac {k Q} 2 \hat {\mathbf r} \int_0^\pi \frac {\paren {r - R \cos \theta} \sin \theta \rd \theta} { {\paren {r^2 - 2 r R \cos \theta + R^2} }^{3/2} }
}}
{{eqn | r = \frac {k Q} 2 \hat {\mathbf r} \int_{\paren {r - R}^2}^{\paren{r + R}^2} \frac 1 {4 r^2 R} \frac {\paren {u + r^2 - R^2} \rd u} {u^{3/2} }
      | c = $u = r^2 - 2 r R \cos \theta + R^2$ and $\d u = 2 r R \sin \theta \rd \theta$
}}
{{eqn | r = \frac {k Q} {8 r^2 R} \hat {\mathbf r} \int_{\paren {r - R}^2}^{\paren{r + R}^2} \paren {\frac 1 {\sqrt u} + \frac {r^2 - R^2}  {u^{3/2} } } \rd u
}}
{{eqn | r = \frac {k Q} {8 r^2 R} \hat {\mathbf r} \intlimits {2 \sqrt u + \paren{r^2 - R^2}  \frac {-2} {\sqrt u} } {\paren {r - R}^2} {\paren {r + R}^2}
      | c = Primitive of Power
}}
{{eqn | r = \frac {k Q} {4 r^2 R} \hat {\mathbf r} \intlimits {\frac {u - r^2 + R^2} {\sqrt u} } {\paren {r - R}^2} {\paren {r + R}^2}
      | c = simplifying
}}
{{eqn | r = \frac {k Q} {4 r^2 R} \hat {\mathbf r} \paren {\frac {\paren{r + R}^2 - r^2 + R^2} {\size {r + R} } - \frac {\paren {r - R}^2 - r^2 + R^2} {\size {r - R} } }
      | c = applying integration limits
}}
{{eqn | r = \frac {k Q} {4 r^2 R} \hat {\mathbf r} \paren {\frac {2rR + 2 R^2} {\size {r + R} } - \frac {-2 r R + 2 R^2} {\size{r - R} } }
      | c = simplifying
}}
{{eqn | r = \frac {k Q} {2 r^2} \hat {\mathbf r} \paren {\frac {r + R} {\size {r + R} } + \frac {r - R} {\size {r - R} } }
      | c = cancelling $2 R$
}}
{{eqn | r = \frac {k Q} {2 r^2} \hat {\mathbf r} \paren {1 + \frac {r - R} {\size {r - R} } }
      | c = $r$ and $R$ are both positive
}}
{{end-eqn}}
Now we consider the two cases: outside the sphere and inside the sphere.
If the position is outside the sphere, then $r > R$, and we have
:$\dfrac {r - R} {\size {r - R} } = 1$
Therefore,
{{begin-eqn}}
{{eqn | l = \mathbf F
      | r = \frac {k Q} {r^2} \hat {\mathbf r}
}}
{{end-eqn}}
If the position is inside the sphere, then $r < R$, and we have
:$\dfrac {r - R} {\size {r - R} } = -1$
Therefore,
:$\mathbf F = \mathbf 0$
{{qed}}