0

In Jackson's book Classical Electrodynamics, 3rd ed., 1999, page 182 there is an integral (I'm editing the original here to keep it short) $$I = \int_0^{2\pi} \dfrac{\cos(\phi') d\phi'}{\sqrt{a^2 + r^2 - 2ar \sin(\theta) \cos(\phi')}} $$

$$ I = \dfrac{1}{\sqrt{a^2 + r^2}} \int_0^{2\pi} \dfrac{\cos(\phi') d\phi'}{\sqrt{1 - A \cos(\phi')}} $$

So, $$A = \dfrac{2ar \sin(\theta) }{a^2 + r^2} $$

Jackson says the integral can be expressed in terms of complete elliptic integrals K and E $$I = \dfrac{4((2 - k^2) K(k) - 2 E(k))}{k^2 \sqrt{a^2 + r^2 + 2ar \sin(\theta) }} $$

where

$$k^2 = \dfrac{4 a r \sin(\theta)}{a^2 + r^2 + 2ar \sin(\theta) } $$

However, when I use Mathematica to evaluate the integral it provides $$I_M = \dfrac{1}{\sqrt{a^2 + r^2}} \dfrac{4((A - 1) E(\dfrac{2A}{A-1}) + K(\dfrac{2A}{A-1}))}{A \sqrt{1 - A}} $$

Using the definition of A above, I have $$\dfrac{2A}{A-1} = \dfrac{-4 a r \sin(\theta)}{a^2 + r^2 - 2 a r \sin(\theta)} \equiv k_M^2$$

and

$$I_M = \dfrac{4((2 - k_M^2) K(k_M^2) + 2 E(k_M^2))}{k_M^2 \sqrt{a^2 + r^2 - 2ar \sin(\theta) }} $$

As you can see

$$I_M \ne I $$

with the power of "k" as argument to K() and E() not the same and some signs are different. So, are Jackson's results wrong, or have typos? Or are the results from Mathematica wrong?
Can someone help show how Jackson's results are obtained, or verify that they are or are not in error? Thanks.

Additional material:

I guess the question comes down to what Mathematica is doing compared to some reference books.
For example, in Table of Integrals, Series, and Products, 7th edition by Gradshteyn and Ryzhik, available online, there is, p. 180,

$$\int \dfrac{\cos(x) dx}{\sqrt{a - b \cos(x)}} = \dfrac{2}{b\sqrt{a + b}}\{(b-a)\Pi(\delta,r^2,r) + a F(\delta, r) \} $$

with (p. 179)

$$ r = \sqrt{\dfrac{2 b}{a + b}} $$

They define, p. 860

$$F(\phi, k) = \int_0^\phi \dfrac{d\alpha}{\sqrt{1 - k^2 \sin^2(\alpha)}} $$

so I can writes $$ k^2 = r^2 = \dfrac{2 b}{a + b} $$

Mathematica writes this integration result in terms of (I am just showing F() here)

$$F(\dfrac{x}{2}|\dfrac{-2b}{a-b}) $$

where the notation is

$$F(x|m) \text{with } m = k^2$$

Notice the "a - b" in the Mathematica result in the denominator. How to reconcile this with the "a + b" in the reference given above?

The Mathematica documentation for EllipticF[phi, m] gives

$$F(\phi | m) = \int_0^\phi \dfrac{d\theta}{\sqrt{1 - m \sin^2(\theta)}} $$

so these are essentually the same function, just slightly different notation.

Except the reference book for the integral I need gives a "a + b" and Mathematica gives "a - b".

What is the reason for this difference?

  • Have you tried WolframAlpha yet? – mathema Dec 22 '22 at 15:27
  • I tried the online WolframAlpha for the integration. It timed out. So I removed the integration limits and it gave a result in terms of E(x|m) and F(x|m). Putting in the integration limits by hand gives me the same answer I had originally. That is, the k^2 value is different from what Jackson reports (has different signs). So, same problem. What I am getting from Mathematica is not matching what Jackson reports. I need to understand why and which is correct. Thanks. –  Dec 22 '22 at 17:12

1 Answers1

2

Mathematica defines its complete elliptic integral $K(k)$ as EllipticK[m], where m=k^2, so that probably acounts for $k$, $k^2$ difference. I have noticed (and been bitten by) Mathematica using non-standard sign conventions as well.

  • Jackson should write either K(k^2) and E(k^2) or he should write K(m) and E(m) with m=k^2. But he doesn't do that. He writes K(k) and E(k). I am not sure what he means. And the value he reports for k^2 is different from Mathematica result. So I am at a lose. –  Dec 22 '22 at 17:17
  • 1
    What mathematicians (and Jackson) call $K(k)$ is called by Mathematica EllipticK[k^2]. The sign differences appear to be change in the sign of $\theta$ somewhere along the way. – mike stone Dec 22 '22 at 17:24
  • I can accept that the K(k) and E(k) is old math notation for K(k^2), E(k^2). But Mathematica changing a sign is not acceptable. I do find that if I evaluate (just picking this out of the air) k^2 = 2A/(A+1) then I get the correct signs as in k^2 above. But Mathematica gives me 2A/(A-1) as I mentioned above. So something is still not understandable. Thanks. –  Dec 22 '22 at 19:37
  • Mathematica uses the convention of Abramowitz and Stegun, "Handbook of Mathematical Functions", so I don't see how you can say it is non standard. – Bill Watts Dec 23 '22 at 04:08
  • @Bill Watts. Thanks for that info! I see that the Wikipedia page on elliptic integrals has a discussion contrasting their notation wi th A&S and Mathematica. – mike stone Dec 23 '22 at 14:19
  • It would be nice if Jackson and Mathematica used the same convention. I run into that problem all the time myself. My advice, just be aware of the difference. – Bill Watts Dec 24 '22 at 01:35