1 over sqrt_a-bcosx_ Dan
PDF · 7 pages · 218.6 KB
Open PDF file
A note by Phil dated 6.23.10 that evaluates the integral of 1/sqrt(a ± b cos x) from 0 to pi as 2K(2b/(a+b))/sqrt(a+b) for a > b > 0, and the companion sqrt integral as an E result. It works from Maple and Wolfram output and uses Gradshteyn-Ryzhik identities on K and the sign symmetry of b. It shows that GR7 (p. 408) swaps E and K, notes the error report sent to Dan Zwillinger, and adds comments on Wolfram Alpha.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
1 Evaluation of an integral PhL 6.23.10
I am tired of doing this integral from scratch over an d over again, so it will now enter the database. I did
the integral below, using Maple as a starting point, then I did the second integral using Wolfram for the
indefinite integral. Wolfram agreed with Maple on the first integral. I found both these definite integrals
in GR7 p 408 with a monstrous huge swap error and I reported this error today to Dan Zwillinger. In any
event, here are the correct results for these two related integrals: ( non-AS argument convention)
∫0 π dx(1 / a ± bcosx ) = (2 / a+b ) K( 2b/(a+b) ) a > b > 0
∫0 π dx a ± bcosx = (2 a+b ) E( 2b/(a+b) ) a > b > 0
and the argument of the complete ellip tic function is in the range (0,1).
Doing the first integral
The integral in question is this one.
I =
∫0 2π dx/ a - bcosx = 2 ∫0 π dx/ a - bcosx a > b
1. Our first adjustment is this
I = (2/
a ) ∫0 π dx/ 1 - fcosx ≡ (2/ a ) J f = b/a f < 1
2. According to Maple we have this for integral J
which I can simplify to read
J = 2 K(
2f/(f-1) ) / 1-f
2 3. GR has useful data on the K function (complete ellip tic of first kind). In that data, symbols k and k' are
both used, and they are connected by k2+ k'2= 1 (GR p 904). Suppose we make a local definition
k2 = 2f/(1+f) k'2 = (1-f) /(1+f) => k2+ k'2= 1
Then what we really have above is this, where I pick +i arbitrarily
J = 2 K(i k/k') / 1-f
We can then use GR page 908 which says K(i k/k') = k'K(k)
so we then get
J = 2 k'K(k) /
1-f = 2 ( 1-f / 1+f ) K(k) / 1-f = 2 K(k)/ 1+f
= 2 K ( 2f/(f+1) )/ 1+f
So we can now look back at our two results so far:
J(f) = 2 K( 2f/(f-1) ) / 1-f = 2 K( 2f/(f+1) )/ 1+f f = b/a (*)
Notice this important fact
J(-f) = 2 K(
2[-f]/([-f]-1) ) / 1-[-f] = 2 K( 2f/(f+1) )/ 1+f = J(f)
which says our result is the same whether we use +b or -b in our integral!
For f < 1 which is our interest so far, the second form in (*) has a real number as the K argument, and this
real number is in the range 0,1:
k
2 ≡ 2f/(1+f) < 1 => 2f < 1+f => f < 1
and we like to have an argument in this range for a K function. This suggests this idea,
J = ∫0 π dx/ 1 - fcosx = 2 K( 2|f|/(|f|+1) )/ 1+|f| valid |f| < 1
and we end up with our K argument in the (0,1 ) nice range. Another way to say it is this:
J = ∫0 π dx/ 1 ± fcosx = 2 K( 2f/(f+1) )/ 1+f valid f < 1
which requires many fewer symbols and gives the same K arg range (0,1).
3
4. Here then is our result:
I =
∫0 2π dx/ a - bcosx = (2/ a ) ∫0 π dx/ 1 - fcosx
= (4/ a ) K(k)/ 1+f
where f = b/a < 1 and
k = 2f/(f+1) = 2b/(a+b)
Meanwhile, we have
a 1+f = a+b
so our final result may be written
I = 4K(
2b/(a+b) ) / a+b b/a < 1 arg of K is in range (0,1)
So what we claim to have shown is this:
∫0 π dx/ a - bcosx = 2K( 2b/(a+b) ) / a+b a > b
Using our trick above, we can extend this result to say
∫0 π dx/ a ± bcosx = 2K( 2b/(a+b) ) / a+b a > b > 0
This integral is not in my GR4, but it was tacked ont o the end of section 3.66 in GR7 where it appears as
the second of this pair: WRONG!!! K and E are swapped!!!!!
4 Unfortunately , GR7 has an E instead of a K in its result a nd gives no reference for either of these results,
leaving us in some doubt. Is Maple wrong? Wolfram claims this indefinite integral
and we know from AS p 589 that F(0|m) = 0 so nothing from the lower endpoint, and then F( π/2|m) is the
K function (not the E function), so Wolfram agrees with me. In more detail, this upper endpoint
evaluation is:
2
(a+b)/(a-b) F( π/2|-2b/(a-b))/ a+b = 2 F( π/2|-2b/(a-b))/ a-b
= 2 F ( π/2, -2b/(a-b) )/ a-b = 2 K( -2b/(a-b) )/ a-b
= 2 K ( 2b/(a+b) ) / a+b // using our symmetry rule noted earlier
= my result, not the GR7 result
Conversely, Wolfram says also
This is a very similar situation, notice the simila rity of the factors. Again, only the upper endpoint
contributes, and if we again change the sign of b, the answer is
= 2
a+b E( 2b/(a+b) )
So that clinches it! GR7 has swapped the E and K in its two equations! I will report this right now.
Here is the email I just sent:
5
with copy in the GR7 directory. NOTE ADDED: Marilyn asked me about Wolfram alpha , and it allows you to do definite integrals,
unlike their regular online integrator site which says in its FAQ (not set up for definite integrals). Here are
some examples: http://www.wolframalpha.com/
The syntax is provided by their Help examples
And here I apply this syntax to the current integral of interest , indefinite as in their integrator online,
6
which, by the way, is followed by lots of useful other info, such as alternate forms and power series
expansion of the result. And here is the definite integral I want
but you see here that they are using the AS convention that k2 is the argument of K. While we're at it, here
is the other definite integral I am doing in this doc. But strangely, it cannot do this one!
7
∫0 π dx a ± bcosx = (2 a+b ) E(2b/(a+b)) a > b > 0