It is sometimes helpful to think of the ground as both

- an additional boundary condition (bringing r = infinity to r = a finite value)
- an infinite supply of charges

### Uncharged, isolated shell

In the original case, where the shell is uncharged and isolated, you can solve for the charge on the inner surface (-q) and outer surface (+q) using Gauss' law. You don't need to ask what the value of the potential is anywhere in order to solve this problem.

The electric field is the physical observable in the problem, and in a physical situation the electric field is uniquely defined. It is the electric field that shows up in the equation of motion, in the Lorentz force
$$m\vec{a} = \vec{F} = q(\vec{E} + \vec{v} \times \vec{B})$$
However, the electric field is a vector field and doing calculations with vectors can sometimes be cumbersome. So, we often instead use the made up quantity *potential*, which is a scalar field, and it is often easier to manipulate scalar functions. We can construct this made up scalar field by saying that our electric field is just the slope (gradient) of our potential field
$$\vec{E}(\vec{r}) = -\vec{\nabla}V(\vec{r})$$
the minus sign meaning our E vector points 'downhill'. But you can see that our potential is not unique, in fact we can often define V(r) in an infinite number of ways. For example, if we add a constant to V(r), our electric field is unchanged
$$\vec{E}(\vec{r}) = -\vec{\nabla}(V(\vec{r}) + C)$$
because the gradient of a constant is zero. Therefore, we see that the value of the potential is **not** physical, only gradients of potential are physical.

In this uncharged case, when solving for the electric potential outside of the shell, we can write
$$V(r) = -\int dr\frac{q}{4\pi\epsilon_o r^2} = \frac{q}{4\pi\epsilon_or} + C$$
Here, the value of this constant is the value of the potential at infinity
$$V(\infty) = C$$

Often in these problems, it is our **convention** to say that that this constant is zero for convenience, so we don't have to remeber whatever arbitrary value we assign it. This is our **conventional** boundary condition
$$V(\infty) = C = 0$$

### Grounded shell

In the grounded shell case, the charge on the inner surface (-q) can be determined from Gauss' law, just like above. It is the the charge on the outer shell that is different.

I think the trick to solving the grounded shell case is to assume that our boundary condition for the potential at infinity is still
$$V(\infty) = 0$$

The role of the ground, then, is to say that we have an additional boundary condition, that the potential in the shell is equal to the potential at infinity, which we arbitrarily assigned the value of
$$V(\infty) = V(shell) = 0$$

And, as we now see, there is no potential difference between the shell and infinity, meaning there is no gradient in potential outside the shell. Therefore, the electric field outside the shell is zero.

Now, the charge on the outer surface (q=0) can be determined from Gauss' law.

### Role of the ground

So, you can think of the ground as

- Bringing the arbitrary boundary condition at infinity to a finite position is space (this case the location of the shell).
- An infinite source of charge that remains neutral no matter how many charges you give to it or take from it. If the shell was grounded, but there was no charge in the middle, the shell would be uncharged. If you then moved a +q to the center of the shell, negative charges from the ground will feel that positive charge and move to the inner surface of the shell from ground.

## Best Answer

In general, the surface charge density $\sigma$ of a polarized material with polarization $\mathbf{P}$ is indeed given by $\sigma=\mathbf{P}\cdot\hat{\mathbf{n}}$, where $\hat{\mathbf{n}}$ is the surface normal vector.

For a sphere, we have $\hat{\mathbf{n}}=\hat{\mathbf{r}}$ in spherical coordinates. So, assuming that $\mathbf{P}$ points in the $z$-axis, we obtain $$\sigma=\mathbf{P}\cdot\hat{\mathbf{r}}=P\hat{\mathbf{z}}\cdot\hat{\mathbf{r}}=P\cos{\theta}.$$

For the next case, we have a spherical shell with inner radius $a$ and outer radius $b$, with polarization $\mathbf{P}=\frac{k}{r}\hat{\mathbf{r}}$. Applying the general formula, we get

$$\sigma=\mathbf{P}\cdot\hat{\mathbf{r}}=\frac{k}{r}\hat{\mathbf{r}}\cdot\hat{\mathbf{r}}=\frac{k}{r}.$$ Letting $r=a$ and $r=b$ gives the surface charge density for the inner and outer surface respectively.