Phil Lucht Math & Physics Archive
Home / Math and Physics Files / Math / Integrals series sums+ GR

algebraic integrals

DOCX · 199.0 KB
Open DOCX file

Phil's working note dated 7.2.10 on indefinite integrals from Gradshteyn-Ryzhik (GR7) involving square roots of linear factors. It starts from an integral in the charge density on a spherical bowl (Smythe Problem 42). It explains why Wolfram and Maple output arctan or arctanh terms with radicals of negative argument, and gives a branch rule: use the same sheet for a radical everywhere. It also covers partial fractions, a Maple check, and an appendix deriving the tan-1 double angle formula.

AI-written summary; may contain errors.

Extracted text (machine-read; may contain errors)
Algebraic Integrals PhL 7.2.10 By this title I generically refer to a large section of GR (indefinite integrals of elementary functions) which involves one or more square roots of (x-a) factors combined with other factors. 1. Motivation: 1 2. We cannot help but wonder where these strange factors are coming from. 2 3. Study the GR7 tan-1 form for ∫dx/(x). 5 4. Converting the Wolfram alternate form to something friendlier. 6 5. The role of Partial Fractions. 6 6. What does Maple have to say about our integral? 7 Appendix A: Derivation of the inverse trig double angle tangent formula 10 1. Motivation: I have been dealing with a certain integral which appears in the study of the charge density on a spherical bowl, Smythe Problem 42. Here is that integral. !Syntax Error, I dx / [(d - x) (1+x)3/2 ] a2 = c t2 = d t>a => d>c (d-c) > 0 where a and t have a certain meaning we ignore here. The cut structure of the integrand is this and our integral runs (0,c) along the real axis and all factors are real and positive, so the integral has a well-defined value, assuming it does not blow up at x = c (it does not, integrand has a zero there). If we throw the corresponding indefinite integral into the Wolfram integrator, we get this result: The main thing to notice here is the unpleasant appearance of and . Both these radicals will have negative arguments in our intended application. I want to know (1) why these factors are appearing; (2) what is the right way to "handle them". 2. We cannot help but wonder where these strange factors are coming from. Here is a simpler case showing the same situation I was thinking Wolfram would be getting these results from an even simpler integral (using my method described elsewhere of differentiating with respect to a parameter) and indeed, we see our same unhappy factors. We can get this into a GR7 standard form this way: y = x-d x = y+d c-x = c-y-d 1+x = 1+y+d The above integral then becomes and we still have our factors of interest. We now go to GR7 where this is a standard form: To see details of our R quadratic polynomial, we have to write now (c-d-x)(1+d+x) = So we identify in R (overloaded c) a = c + cd - d - d2 = c(d+1) - d(d+1) = (d+1)(c-d) b = (c-2d-1) c = -1 Notice that GR shows three terms, and Wolfram shows 3 terms. The first terms correspond as you can see, just . The 2nd W term matches the 3rd GR term. But it is the 3rd W term matching the 2nd GR term that shows our issue. The good news is that Wolfram is just following this "GR plan" to do this integral. So we now investigate the source of our issue: so yes, this is where our factors are coming from. We consult GR7 and indeed we hit the jackpot So Wolfram has chosen the arctan form (and has used my doubling formula), so we suddenly have things like floating around, and this becomes the , so that answers that question! Wolfram has to choose one of these forms! If you enter the obvious standard form, it chooses the log instead Wolfram then broke the into the product probably arbitrarily. Once he did that, we have to keep these as separate radicals, not as a combined radical, because in forming the double angle thing, he no doubt assumed separate radicals. This will become clearer below. The point is that we should not attempt to recombine these and say = , for example, although it is certainly a tempting thing to do. Keep them separate, just the way they appear in the Wolfram expression. 3. Study the GR7 tan-1 form for ∫dx/(x). So here we have ∫dx/(x) = (1/) tan-1[ (2a+bx)/(2)] a < 0 This is unambiguous for a < 0, agreed, but the question is: how do we "continue" for other a? We are forced to have this in our Wolfram result, we cannot tell it do "make another selection". The cut structure of RHS(a) in the a-plane is not easy to understand because we have several branch points inside the tan-1 function (one visible, and something must happen inside R, another branch point that is x-dependent). But this certainly seems the right thing to do: decide that your are going to select some "sheet" and work with that sheet. For example, -a = |-a| e+iπ = |-a| i = +i We could take the other sheet (other sign), but let's go with this one. We then have RHS(a) = (1/(i)) tan-1[ (2a+bx)/(2i)] = (1/(i)) (-i) tanh-1 [ (2a+bx)/(2)] // using tan-1ix = i tanh-1x = – (1/) tanh-1 [ (2a+bx)/(2)] Had we chosen the other sheet, the result would be the same, so there is no ambiguity introduced here. If it happens that R is real and positive, then we are done with our "continuation". The minus sign is genuine! We must use the same sheet for everywhere it appears! That is the main point. 4. Converting the Wolfram alternate form to something friendlier. Let's now apply this "rule of understanding" to our "alternate form" seen above: where that tan-1 doubling formula has been used. Accepting the separate factors, we can do the above process to and to at the same time. Just to make sure we don't mess up, let's say = ε1 i εi = ±1 independently! εi = 1/εi = ε2 i We must use the same sign εi in all places factor i appears, that is the rule. So we have 2 ε1ε2 i i tan-1{ [ i ε2] / [ i ε1 ] } = – 2 ε1ε2 tan-1{ [ ε2] / [ ε1 ] } = – 2 ε1ε2 ε2/ε1 tan-1{ [ ] / [ ] } = – 2 tan-1{ [ ] / [ ] } So here then is the Wolfram result after doing this conversion: (and yes, + constant) I(y;a,t)/2 = – 2 tan-1 [/()] /(1+d)2 – 2/[ (1+d) ] In this manner, we obtain an unambiguous minus sign out front!!! Also, since we did two at once, they compensated and we never went to tanh-1. We could have done them one at a time and had tanh-1 as an intermediate result. Note: It was by erroneously omitting this minus sign that I got a + sign in the second term of Smythe's Problem 42 result, and I struggled a whole day to find my error. Now I understand. 5. The role of Partial Fractions. Consider our original integral of interest !Syntax Error, I dx / [(d - x) (1+x)3/2 ] a2 = c t2 = d t>a => d>c (d-c) > 0 We could write this as !Syntax Error, I dx / [(d - x) (1+x)2 ] The product of poles factor can be expanded into partial fractions. which works for any powers of the factors. Then, after shifting the integration variable, each of these integrals has the form (this shift changes R to a new R, but still quadratic) ∫dx /xn I think there is a systematic way to do such integrals. For example, consider I(x, β, n) = ∫dx (x+β)–n ∂β I(x, β, n) = (-n) ∫dx (x+β)–n-1 = (-n) I(x, β, n+1) // then set β = 0 So there is a recursive method. Start with n = 1 and you then have them all. I have not studied how all the combinations of and simple powers are done, but I could if I wanted to. 6. What does Maple have to say about our integral? "Since this is a lot of fiddly stuff, it is probably best to just let Maple handle the details, and might as well just do the initial integral" I(a,t) = 2 !Syntax Error, Idy / [(t2 - y) (1+y)3/2 ] To make Maple life easier, we can set a2 = c and t2 = d and t>a => d>c I(a,t)/2 = !Syntax Error, Idy / [(d - y) (1+y)3/2 ] Before going on, it is useful to draw the cut structure of the integrand, and show the integration region which is clean, being (0,c). Consider then our original integral of interest !Syntax Error, I dx / [(d - x) (1+x)3/2 ] a2 = c t2 = d t>a => d>c (d-c) > 0 I enter this in Maple and we now just take our lumps: (factor caused some internal polys to get factored) Notice that 2 inside terms could be grouped as arctanh[] (y+1) and there is a similar grouping for the other two terms. We really need to process this before looking at any endpoints. Start by doing this rewrite: I(y;a,t)/2 = { arctanh[...] (y+1) - 2(d+1) } /[ (1+y)(1+d)2 ] [...] = (1/2) (dc-d+2c+cy-y-2yd) / All root arguments are positive except which appears in two places. We now follow our rule described above, which is to treat a factor the same in all places it appears. So = (±i) Whichever choice we take, we must use the same choice in both places it appears! So we make this change inside our [...] object [...] = (∓ i) (1/2) (dc-d+2c+cy-y-2yd) / But then we use this rule (Schaum page 31, and I have derived it to check it as well) arctanh(∓iq) = ∓i arctan(q) We then end up with I(y;a,t)/2 = { (±i) (∓i ) tan-1(...) (y+1) - 2(d+1) } /[ (1+y)(1+d)2 ] (...) = (1/2) (dc-d+2c+cy-y-2yd) / or I(y;a,t)/2 = tan-1 (...) /(1+d)2 - 2/[ (1+d) ] (...) = (1/2) (dc-d+2c+cy-y-2yd) / The above is my final result in its first form This then explains how the tanh-1 stuff goes away, and our integral only has tan-1 , that was a bit of a mystery for a while. Now is a good time to compare this with Wolfram's result. Second form derivation. Now we can convert our result to a nicer form by using the following trick (see Appendix A) 2 tan-1(z) = tan-1(2z/(1-z2)) + N π where N is some integer Since we are doing an indefinite integral, and our integral has the form constant * tan-1 (...), any extra factors of π can be absorbed in the "+ constant" of our indefinite integral, so we can therefore ignore such extra Nπ term. Now consider: z = /() z2= (1+x)(d-c)/ [(d+1)(c-x)] z2 - 1 = [(1+x)(d-c) - (d+1)(c-x) ] / [(d+1)(c-x)] = - (dc-d+2c+cy-y-2yd) / [(d+1)(c-x)] 1-z2 = (dc-d+2c+cy-y-2yd) / [(d+1)(c-x)] 2z/(1-z2) = 2 ( / [ ] ) [(d+1)(c-x)] / (dc-d+2c+cy-y-2yd) = 2 / (dc-d+2c+cy-y-2yd) so I have just shown that 2 tan-1[/()] = tan-1[2 / (dc-d+2c+cy-y-2yd)] But we know that cot-1q + tan-1q = π/2 so, again dropping constant terms, we can say tan-1[2 / (dc-d+2c+cy-y-2yd)] ≈ – cot-1[2 / (dc-d+2c+cy-y-2yd)] = – tan-1[(dc-d+2c+cy-y-2yd) / (2 ) ] This shows that, if we ignore constant terms, we can say tan-1[(dc-d+2c+cy-y-2yd) / (2 ) ] ≈ – 2 tan-1[/()] We can then install this into our Maple-derived integral to get our second form: I(y;a,t)/2 = – 2 tan-1 (...) /(1+d)2 – 2/[ (1+d) ] (...) = /() This is the same as our converted Wolfram form shown above! Appendix A: Derivation of the inverse trig double angle tangent formula First here is a statement of this formula: 2 tan-1(x) = tan-1[ 2x/(1-x2) ] + Nπ N = -1,0 or 1 N = - sign(θ) int ( |θ|/[π/2]) When we talk about θ = tan-1x or x = tanθ, we always have in mind θ in (-π/2,π/2) which is the principle branch situation. But the formula is found by using a tan(2θ) double angle formula, and the π term arises if the angle 2θ goes out of range on the positive or negative side and so must be brought back in range. You can verify this stuff in Maple (which I did). Derivation: Consider this problem where we want to relate x and y. 2 tan-1(x) = tan-1(y) (*) Assume that θ = tan-1(x) is in the range (-π/2,π/2) which defines the principle branch of the tan-1(x) function, as shown Schaum page 18. Those dotted curves above and below would be the other branches. But for our purposes here, let's just look at θ in the range (0,π/2) and the negative side result can be figured out later. We start by writing, θ = tan-1(x) => x = tanθ so (*) then says 2θ = tan-1(y) Now go look up in Schaum tan(2θ) = 2 tan(θ)/(1 - tan2(θ)) = 2x/(1-x2) As long as 2θ is less than π/2, angle 2θ is in the "legal range" for the principle branch, and we can apply the operator tan-1 to both sides of the above and we get 2θ = tan-1[2x/(1-x2)] Therefore we have shown 2 tan-1(x) = tan-1[2x/(1-x2)] where needed to assume that θ < π/4 which means x = tan(θ) < 1. But suppose θ > π/4 so that x = tanθ > 1. Then what happens? 2θ lies in range (π/2,π) . Then looking at our graph of tan(x) on Schaum page 14, we gave to back-shift 2θ by π to get it back into the legal range, so this time we get tan-1 ( tan(2θ) ) = 2θ-π More generally, here is an interesting general fact, where floor( -.3) = -1, floor(1.2) = 1. tan-1 ( tanφ ) = φ - π sign(φ) int ( |φ|/[π/2]) So then there are two cases for a polar angle θ which is in range (0,π/2) : θ < π/4: 2θ = tan-1[ 2x/(1-x2) ] => 2 tan-1(x) = tan-1[ 2x/(1-x2) ] θ > π/4: 2θ - π = tan-1[ 2x/(1-x2) ] => 2 tan-1(x) - π = tan-1[ 2x/(1-x2) ] We can now include the negative side and generalize this to say where x = tanθ, and where we assume that we are dealing with the principle branch so θ in (-π/2,π/2) : |θ| < π/4 or |x| < 1: 2θ = tan-1[ 2x/(1-x2) ] => 2 tan-1(x) = tan-1[ 2x/(1-x2) ] θ > π/4 or x > 1: 2θ - π = tan-1[ 2x/(1-x2) ] => 2 tan-1(x) = tan-1[ 2x/(1-x2) ] + π θ < -π/4 or x < -1: 2θ + π = tan-1[ 2x/(1-x2) ] => 2 tan-1(x) = tan-1[ 2x/(1-x2) ] - π So our general result is this, again with x = tan θ and θ = tan-1x : 2 tan-1(x) = tan-1[ 2x/(1-x2) ] + Nπ N = -1,0 or 1 N = - sign(θ) int ( |θ|/[π/2])