Converting spherical electric potential to cartesian coordinates

232 Views Asked by At

How can I convert this spherical scalar function...

$$\Phi(r,\phi,\theta)=kq\left[\frac{1}{r-d\cos(\theta)} - \frac{1}{r+d\cos(\theta)}\right]$$

to, what should be, its rectangular equivalent...

$$\Phi(x,y,z)=kq\left[\frac{1}{\sqrt{x^2+y^2+(z-d)^2}} - \frac{1}{\sqrt{x^2+y^2+(z+d)^2}}\right]$$

I tried making the substitutions, $r=\sqrt{x^2+y^2+z^2}$ and $\theta=\cos^{-1}\left(\frac{z}{\sqrt{x^2+y^2+z^2}} \right)$, but to no avail. Any guidance would be appreciated.

FYI: This problem comes from Griffiths' Electrodynamics example 3.2. He finds the electric potential surrounding a point charge at offset $d$. I am trying to do the same but I started out in spherical coordinates. I would like to verify against his solution in rectangular coordinates.

1

There are 1 best solutions below

0
On

We know for sure that (ignoring the $\frac{q}{4\pi\epsilon_0}$) \begin{align} \Phi_{\text{cart}}(x,y,z) &= \dfrac{1}{\sqrt{x^2 + y^2 +(z-d)^2}} - \dfrac{1}{\sqrt{x^2 + y^2 +(z+d)^2}} \\ &= \dfrac{1}{\sqrt{x^2 + y^2 +z^2 -2zd + d^2}} - \dfrac{1}{\sqrt{x^2 + y^2 +z^2 +2zd + d^2}} \end{align} is the right answer for this image charge problem. Now, if we convert this to spherical coordinates, we get the function \begin{align} \Phi_{\text{spherical}}(r,\theta,\phi) &= \dfrac{1}{\sqrt{r^2 -2rd\cos \theta + d^2}} - \dfrac{1}{\sqrt{r^2 +2rd\cos \theta + d^2}}, \end{align} which is clearly very different from what you got. I'm not sure how you arrived at $r\mp d\cos \theta$ in your denominators, but you must have done something wrong in your geometry (draw a figure similar to Figure $3.13$ (but of course modified for this particular problem) and then apply the cosine law carefully again to obtain the distance).