Introduction to Electrodynamics/Problem 2.7

From Jonathan Gardner's Physics Notebook
Jump to: navigation, search

Introduction

This is rather difficult.

It wasn't terribly hard to get the integral. You can do this by brute force, which I demonstrate below.

However, the integral you arrive at is not trivial. I had to do the following to solve it:

  1. Look it up in a table. Couldn't find it.
  2. Try my hand at substitution of variables. The obvious choice worked well.
  3. The resulting integral could be looked up, but it was a mess.
  4. Looking at the solutions manual, I was not surprised that Griffiths just assumed that the student would be able to solve the integral. He spent about 4 words on the solution, with most of them being "look it up".
  5. I tried several other substitution of variables. The one that would've worked was not the one that I tried.
  6. By luck, I stumbled across a simple, clean solution to the second integral in Wolframalpha.com. It was a substitution of variables that I could've used.
  7. From there, it was all algebra.

The solution to the integral is not the end of the story. As he hints in the problem, you have to think about the signs of everything. Guess wrong, and you get either 2 or -2 or 0. I'll talk about this extensively below.

Setting Up the Integral

Calculating r

First, let's start with a formal definition of <math>\mathbf{r}</math>. This is the vector that points from a point on the surface of the sphere to the point z above the x-y plane.

So, it is simply:

<math> \begin{align} \mathbf{r} &= \mathbf{P} - \text{some point on the sphere} \\

          &= (z \hat k) - (R \sin \theta \cos \phi \hat i + R \sin \theta \sin \phi \hat j + R \cos \theta \hat k) \\
          &= -R \sin \theta \cos \phi \hat i -R \sin \theta \sin \phi \hat j + (z - R \cos \theta) \hat k \\

\end{align} </math>

The quantity <math>r^2</math> is simply <math>\mathbf{r} \dot \mathbf{r}</math>:

<math> \begin{align} r^2 &= R^2 \sin^2 \theta \cos^2 \phi + R^2 \sin^2 \theta \sin^2 \phi + (z - R \cos \theta)^2 \\

   &= R^2 \sin^2 \theta + z^2 + R^2 \cos ^2 \theta - 2 z R \cos \theta \\
   &= R^2 + z^2 - 2 z R \cos \theta \\

\end{align} </math>

Since this is what the Law of Cosines would've given us, it's not surprising.

Calculating the r term

Now, to calculate the elusive quantity <math>\hat r / r^2 = \mathbf{r} / (\mathbf{r} \dot \mathbf{r})^{3/2}</math>:

<math> \begin{align} {\hat r \over r^2} &= {-R \sin \theta \cos \phi \hat i -R \sin \theta \sin \phi \hat j + (z - R \cos \theta) \hat k

 \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

\end{align} </math>

Calculating the Infinitesimal Field

With this, we can calculate the infinitesimal <math>d\mathbf{E}</math>.

<math> \begin{align} d\mathbf{E} &= {1 \over 4 \pi \epsilon_0} \sigma da {\hat r \over r^2} \\

           &= dE_x \hat i + dE_y \hat j + dE_z \hat k \\
        da &= R^2 \sin \theta d\theta d\phi \\

dE_x &= -{1 \over 4 \pi \epsilon_0} \sigma R^2 \sin \theta d\theta d\phi {R \sin \theta \cos \phi \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

    &= -{1 \over 4 \pi \epsilon_0} { \sigma R^3 \sin^2 \theta d\theta \cos \phi d\phi \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

dE_y &= -{1 \over 4 \pi \epsilon_0} \sigma R^2 \sin \theta d\theta d\phi {R \sin \theta \sin \phi \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

    &= -{1 \over 4 \pi \epsilon_0} { \sigma R^3 \sin^2 \theta d\theta \sin \phi d\phi \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

dE_z &= {1 \over 4 \pi \epsilon_0} \sigma R^2 \sin \theta d\theta d\phi {z - R \cos \theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

    &= {1 \over 4 \pi \epsilon_0} {\sigma R^2 \sin \theta d\theta d\phi (z - R \cos \theta) \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

\end{align} </math>

Horizontal Components Cancel

Of note, the x and y components of the electric field will be zero when integrating over the sphere. This is because they will cancel out with the <math>\phi</math> integral. If you didn't see this obvious result, the calculations to show it to be so are below.

<math> \begin{align} \int dE_x &= \int -{1 \over 4 \pi \epsilon_0} { \sigma R^3 \sin^2 \theta d\theta \cos \phi d\phi \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

         &= -{1 \over 4 \pi \epsilon_0} \sigma R^3  \int_{\phi=0}^{2\pi} \cos \phi d\phi \int_{\theta=0}^{\pi} {\sin^2 \theta d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\
         &= -{1 \over 4 \pi \epsilon_0} \sigma R^3  (\sin \phi) \big|_{0}^{2\pi} \int_{\theta=0}^{\pi} {\sin^2 \theta d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\
         &= -{1 \over 4 \pi \epsilon_0} \sigma R^3  (\sin 2\pi - \sin 0) \int_{\theta=0}^{\pi} {\sin^2 \theta d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\
         &= -{1 \over 4 \pi \epsilon_0} \sigma R^3  (0) \int_{\theta=0}^{\pi} {\sin^2 \theta d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\
         &= 0 \\

\int dE_y &= 0 \text{ by similar reasoning}\\ \end{align} </math>

The z component

The z component, of course, is where the electric field will end up.

<math> \begin{align} \mathbf{E} &= \int dE_z \hat k \\ \int dE_z &= \int {1 \over 4 \pi \epsilon_0} {\sigma R^2 \sin \theta d\theta d\phi (z - R \cos \theta) \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

         &= {1 \over 4 \pi \epsilon_0} \sigma R^2 \int_{0}^{2\pi} d\phi \int_{0}^{\pi} {\sin \theta (z - R \cos \theta) d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\
         &= {1 \over 4 \pi \epsilon_0} 2 \pi \sigma R^2 \int_{0}^{\pi} {\sin \theta (z - R \cos \theta) d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}} \\

\end{align} </math>

Solving the Integral: Substitution 1

The integral is pretty scary. If you look it up, you may not find it.

My first guess is to substitute <math>x = - \cos \theta; \ dx = \sin \theta d\theta</math>. Don't forget to change the boundaries.

<math> \begin{align} \int_{0}^{\pi} {(z - R \cos \theta) \sin \theta d\theta \over (R^2 + z^2 - 2 z R \cos \theta)^{3/2}}

 &= \int_{-1}^{1} {(z + R x) dx  \over (R^2 + z^2 + 2 z R x)^{3/2}} \\

\end{align} </math>

Wrong Turn 1: The Sum of Two Integrals

(I include this because it shows how much work you have to do to see when you have gone down a bad road.)

The integral is really the sum of two different integrals now. The first one I looked up in a table of integrals:

<math> \begin{align} \int_{-1}^{1} {z dx \over (R^2 + z^2 + 2 z R x)^{3/2}}

&= z \int_{-1}^{1} (R^2 + z^2 + 2 z R x)^{-3/2} dx \\
&= z \int_{-1}^{1} (a + b x)^{n} dx
   && \text{ where } a = R^2 + z^2,\  b = 2zR,\  n = -3/2 \\
&= z \left ( {(a + bx)^{n+1} \over b(n+1)} \right ) \bigg |_{-1}^1 \\
&= {z \over b(n+1)} \left ( {1 \over \sqrt{a+b}} - {1 \over \sqrt{a-b}} \right) \\
&= -{1 \over R} {\sqrt{a-b} - \sqrt{a+b} \over \sqrt{(a+b)} \sqrt{(a-b)}} \\
&= {\sqrt{a+b} - \sqrt{a-b} \over R \sqrt{(a+b)} \sqrt{(a-b)}} \\

\end{align} </math>

It is at this point that we must pause. Since we have square roots, the question is do we take the positive or the negative roots?

We'll try the other half of the integral now.

<math> \begin{align} \int_{-1}^{1} {R x dx \over (R^2 + z^2 + 2 z R x)^{3/2}}

 &= R \int_{-1}^{1}  x (R^2 + z^2 + 2 z R x)^{-3/2} dx \\
 &= R \int_{-1}^{1}  x (a + b x)^{n} dx && \text{ same values of } a, b, n \\
 &= R \left( {(a + bx)^{n+2} \over b^2(n+2)} \right) \bigg |_{-1}^{1} \\
 &= R {\sqrt{a + b} - \sqrt{a - b} \over 2 z^2 R^2} \\
 &= {\sqrt{a + b} - \sqrt{a - b} \over 2 z^2 R} \\

\end{align} </math>

Once again, we must pause.

At this point, let's combine the two integrals.

<math> \begin{align} \int_{-1}^{1} {(z + R x) dx \over (R^2 + z^2 + 2 z R x)^{3/2}}

 &= {\sqrt{a+b} - \sqrt{a-b} \over R \sqrt{(a+b)} \sqrt{(a-b)}} +  {\sqrt{a+b} - \sqrt{a-b} \over 2 z^2 R} \\

\end{align} </math>

Note that:

<math> \begin{align} (a+b) &= R^2 + z^2 + 2zR \\

     &= (R+z)^2 \\

(a-b) &= R^2 + z^2 - 2zR \\

     &= (R-z)^2

\end{align} </math>

Let's talk about the square roots. We have only two square roots that appear above.

<math> \begin{align} \sqrt{a+b} &= \sqrt{(R+z)^2} \\

          &= \pm (R+z) \\

\sqrt{a-b} &= \sqrt{(R-z)^2} \\

          &= \pm (R-z) \\

\end{align} </math>

Substituting that in:

<math> \begin{align} & {\sqrt{a+b} - \sqrt{a-b} \over R \sqrt{(a+b)} \sqrt{(a-b)}} + {\sqrt{a+b} - \sqrt{a-b} \over 2 z^2 R} \\ &= {\pm (R+z) \pm(R-z) \over R (R+z)(R-z)} + {\pm(R+z) \pm(R-z) \over 2z^2R} \\ &= {\pm 2z^2 (R+z) \pm 2z^2 (R-z) \pm (R+z)^2(R-z) \pm (R+z)(R-z)^2 \over 2z^2R(R+z)(R-z)} \\ \end{align} </math>

At this point, I can't really go any further. It's getting more rather than less complicated.

Maybe, if I am really careful, I can make some logic out of this mess.

Looking it Up

Looking up the solution in Griffith's, I find that I am supposed to get the integral to reduce to:

<math>{1 \over z^2}\left( {z+R \over |z+R|} - {z - R \over |z-R|}\right)</math>

What I have above isn't even close. Perhaps if I am more careful, stop relying on tables, and just find a better substitution...

Wrong Turn 2

I spent a great deal of time looking at <math>y = z^2 + R^2 + 2zRx</math>. This didn't seem to help.

Wolframalpha

Wolframalpha was able to give me the result I expected. They substituted <math>y = \sqrt{z^2 + R^2 + 2zRx}</math>.

This works out rather well.

<math> \begin{align} y &= \sqrt{z^2 + R^2 + 2zRx} \\ y^2 &= z^2 + R^2 + 2zRx && y^2 > 0 \text{ since }y\text{ is real} \\ 2zRx &= y^2 - (z^2 + R^2) \\ x &= {y^2 - z^2 - R^2 \over 2zR} \\ dx &= {y \over zR} dy \\ x=1 &\implies y = \sqrt{(z+R)^2} = |z+R| \\ x=-1 &\implies y = \sqrt{(z-R)^2} = |z-R| \\ \end{align} </math>

Square Root of the Square

Where did I get the absolute value from?

The square root of the square is considered to be positive. This is a matter of convention.

Plug 'n Chug

Plugging that all in:

<math> \begin{align} \int_{-1}^1 {z+Rx \over (z^2 + R^2 + 2zRx)^{3/2}} dx

 &= \int_{|z-R|}^{|z+R|} {z + R\left({y^2 - z^2 - R^2 \over 2zR}\right)
\over y^3}  {y \over zR} dy \\

&= \int {z + \left({ y^2 - z^2 - R^2 \over 2z}\right) \over zRy^2} dy \\ &= \int {2z^2 - z^2 - R^2 + y^2 \over 2z^2Ry^2} dy \\ &= {1 \over 2z^2R} \int {z^2 - R^2 + y^2 \over y^2} dy \\ &= {1 \over 2z^2R} \left [ (z^2 - R^2) \int {1 \over y^2} dy + \int dy \right ] \\ &= {1 \over 2z^2R} \left [ (z^2 - R^2) ({-1 \over y}) + y \right ] \bigg |_{|z-R|}^{|z+R|} \\ &= {1 \over 2z^2R} \left [ y - {z^2 - R^2 \over y} \right ] \bigg |_{|z-R|}^{|z+R|} \\ &= {1 \over 2z^2R} \left [ y - {z^2 \over y} + {R^2 \over y} \right ] \bigg |_{|z-R|}^{|z+R|} \\ &= {1 \over 2z^2R} \left [ {y^2 - z^2 + R^2 \over y} \right ] \bigg |_{|z-R|}^{|z+R|} \\ &= {1 \over 2z^2R} \left [ {(|z+R|)^2 - z^2 + R^2 \over |z+R|} - {(|z-R|)^2 - z^2 + R^2 \over |z-R|} \right ] \\ &= {1 \over 2z^2R} \left [ {(z+R)^2 - z^2 + R^2 \over |z+R|} - {(z-R)^2 - z^2 + R^2 \over |z-R|} \right ] \\ &= {1 \over 2z^2R} \left [ {(z^2+2zR+R^2) - z^2 + R^2 \over |z+R|} - {(z^2-2zR+R^2) - z^2 + R^2 \over |z-R|} \right ] \\ &= {1 \over 2z^2R} \left [ {2R^2+2zR \over |z+R|} - {2R^2 -2zR \over |z-R|} \right ] \\ &= {1 \over z^2} \left [ {R+z \over |z+R|} - {R-z \over |z-R|} \right ] \\ &= {1 \over z^2} \left [ {z+R \over |z+R|} + {z-R \over |z-R|} \right ] \\ \end{align} </math>

The electric field ends up being:

<math> \mathbf{E} = {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ {z+R \over |z+R|} + {z-R \over |z-R|} \right ] \hat k </math>

Wrapping it Up

Let's consider the possibilities:

<math> \begin{align} z>R \implies &&|z+R| &= z+R & |z-R| &= z-R \\ -R<z<R \implies &&|z+R| &= z+R & |z-R| &= -(z-R) \\ z<-R \implies &&|z+R| &= -(z+R) & |z-R| &= -(z-R) \\ \end{align} </math>

This leads to the following conclusions:

Above

When <math>z>R</math> (electric field above the sphere):

<math> \begin{align} \mathbf{E} &= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ {z+R \over |z+R|} + {z-R \over |z-R|} \right ] \hat k

\\
&= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ {z+R \over z+R} + {z-R \over z-R} \right ]  \hat k
\\
&= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ 1 + 1\right ]  \hat k
\\
&= {1 \over 4 \pi \epsilon_0} 4 \pi R^2 \sigma {1 \over z^2}  \hat k
\\

\end{align} </math>

The total charge is the surface area of the sphere times the surface charge density, namely <math>q = 4 \pi R^2 \sigma</math>, so the electric field is:

<math> \mathbf{E} = {1 \over 4 \pi \epsilon_0} {q \over z^2} \hat k </math>

which is what the field would be for a particle of charge q at the origin.

Inside

When <math>-R < z < R</math> (electric field inside the sphere):

<math> \begin{align} \mathbf{E} &= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ {z+R \over |z+R|} + {z-R \over |z-R|} \right ] \hat k

\\
&= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ {z+R \over z+R} + {z-R \over -(z-R)} \right ]  \hat k
&= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ 1 - 1 \right ]  \hat k
&= 0

\end{align} </math>

This might be hard to believe, but you'll see shortly why it must be true with much simpler reasoning.

Below

When <math>z < -R</math> (electric field below the sphere):

<math> \begin{align} \mathbf{E} &= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ {z+R \over |z+R|} + {z-R \over |z-R|} \right ] \hat k

\\
&= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ -{z+R \over z+R} -{z-R \over z-R} \right ]  \hat k
\\
&= {1 \over 4 \pi \epsilon_0} 2 \pi R^2 \sigma {1 \over z^2} \left [ -1 -1\right ]  \hat k
\\
&= -{1 \over 4 \pi \epsilon_0} 4 \pi R^2 \sigma {1 \over z^2}  \hat k
\\

\end{align} </math>

Which is the same as above the sphere but pointing down.

Expected Result

I've already done the part on Gauss's Law, so I already know what result to expect.

<math> \begin{align} \mathbf{E} &= {1 \over 4 \pi \epsilon_0} {4 \pi R^2 \sigma \over z^2} \hat k && \text{ when } z > R \text{ (point charge) } \\ \mathbf{E} &= 0 && \text{ when } z < R \\ \end{align} </math>