Phil Lucht Math & Physics Archive
Home / Math and Physics Files / Math / Special Functions / Legendre Functions

Maple CTR Legendre

DOCX · 161.6 KB
Open DOCX file

Working notes by Phil dated 2.18.10, with an addendum of 3.27.10, moved from another Legendre and Maple document for storage. They analyze the cut structure of Bateman's Legendre forms (14), (32) and (41) and the effect of replacing z-1 by 1-z in the outside factors. They derive phase relations between the classical and CTR functions, including P_CTR = e^{±iπμ/2} P, and test them in Maple. He concludes the CTR Q function appears ill-defined and should not be used.

AI-written summary; may contain errors.

Extracted text (machine-read; may contain errors)
Maple CTR Legendre PhL 2.18.10 I have now given up on trying to "reverse engineer" the definition of the Maple "Cut To Right" Legendre functions. I did a lot of work, and will store it all here for some possible future use. I did this work in the middle of document "Legendre Functions of various Forms and Maple.doc", and I am now moving all that stuff here for storage. I am storing mws of the same name which has lots of fiddlings. Note Added 3.27.10: Now that I know how to look at Maple code, I could go figure out the CTR stuff. I do know that on (-1,1) the Maple CTR P functions match Bateman's on the cut P functions apart from the special "alternate definition" of P when m = neg int and n is a nonsense value. ____________________________ (d) Description of the cuts for the Q function as it appears in Bateman (41) I mention this in order to clarify something a few sections ahead. Note that this formula (41) is the one Maple quotes in their Help above for their Q representation. The different Bateman forms for the P and Q functions arise from the transformation properties of the hypergeometric function, as discovered long ago by Kummer, eg Bateman p 105-8. When the various forms are used, the cut structure can appear quite complicated, as we shall see in this example. The point is that the cut structure appears differently in the different expressions for P and Q, but it is of course ultimately the same. This (41) Q has the form z-1-ν-μ(z2-1)μ/2 F(a,b,c; 1/z2) and we now want to study all the cuts. The F function has a cut for ξ = 1/z2 ≥ 1, according to our Section 5 above. It is useful to plot this function ξ = 1/z2, This shows that as z runs ( 1→0), the argument ξ runs (1→∞). And: This shows that as z runs (-1→0), the argument ξ runs (1→∞). I like to view this as two cuts in the z plane, the first is (0,1) and the second is (-1,0) [although one can of course draw them as one (-1,1)]. These two cuts will appear green below. [Note: The hypergeometric series F(a,b,c; 1/z2) diverges inside |z| = 1, but the hypergeometric function F(a,b,c; 1/z2) which continues this series has these green cuts. This detail is studied in Complex / " What is the cut structure of f(z) = F(a,b,c; 1/z2)" ] On the outside, the factor z-1-ν-μ has a cut (-∞,0) drawn blue. Then the factor (z2-1)μ/2 is f3(z,μ) which I will now regard as the two cuts (-∞,-1) black and (-∞,1) red. This is a pretty complicated scenario, as shown on the left, but if we crush all the cuts on top of each other, we get the more standard picture shown on the right. We have drawn the cuts strangely in an effort to maintain Maple's way of evaluating P and Q for real arguments, as noted above. = Anticipating the next section, we could ask: how do these cuts change if we make the replacement (z-1)μ/2 → (1-z)μ/2 just in the outside factor of Q formula (41) ? We know this will reflect the red cut and make it go to the right, giving this picture: = This would then give a Q function that is cut on the entire real axis! Certainly it is cut in (0,1) since the green cut is sitting there all alone and cannot possibly be cancelled against some other cut. Maple's help above suggests that this is the Q function they are using, but I am pretty sure that is not what they mean. ****************************************************** still in other doc ************ 2. The Maple Cut-To-Right (CTR) Legendre Functions. (a) My conclusion is that these are "ill-defined" at least for the Q function. See separate document "Maple CTR Legendre.doc". I tried defining these functions in various different ways, including the way they claim in their Help, but none of my trial definitions gives the same result that you get setting the cut to the right with _EnvLegendreCut := 1..infinity . Their QCTR function delivers near-real values on the cut (-1,1), and complex values other places. When z is close to the cut, say .36± iε, my methods give the correct real part, but the wrong imaginary part. (b) A web search on < maple _EnvLegendreCut> delivers only 39 hits, same for similar searches. So this is not really something anybody has worked with much. (c) Early on, I thought these functions might be the "analytic continuations" like my famous Q1(iζ) function, but that is not the case. My continued Q1,0R blows up one way and blows down the other way on the imaginary axis, but here is what Q1,CTR does: (it is symmetric, blowing up both ways). If I want to use Q1,0R type functions, I will have to construct them myself. (d) I think it would be very good to NEVER USE these CTR Maple functions. I feel they don't really mean anything at all. ******************************************************************************** It is my belief that these functions are what you get if you simply replace z-1 by 1-z in the "outside factors" (only) in Bateman formulas (14) and (32), both of which have ξ = (1-z)/2. Recall these general forms from above for the classical Legendre functions P = f1(z,μ) F(ξ) (14) [e-iπμ Q] = f1(z,-μ)F(ξ) + f1(z,μ)F(ξ) (32) After making the change just noted, we end up with PCTR = f2(z,μ) F(ξ) (14) [e-iπμ QCTR] = f2(z,-μ)F(ξ) + f2(z,μ)F(ξ) (32) You don't mess with the argument of the F function. Now recall from Section 2 above that f2 has this cut structure: (think blue on left and red on right) and the F function has only the cut running from -1 to the left (black) , so we find then the following cut structure for the CTR versions of the P and Q functions: = The whole purpose of defining these CTR P and Q functions like this is to cause the (-1,1) portion of the real axis to be uncut. These functions of course are still solutions of the Legendre differential equation, and they are thus perhaps more useful in problems involving this (-1,1) region. Most importantly, these CTR functions are defined over the entire complex z plane, which distinguishes them from the traditional averaged P and Q functions people use just for z = x = real in (-1,1). These averaged functions as we might call them are called "on the cut" functions by Bateman and others, see Bateman p 143 Section 3.4. (a) Maple Help Confusion. If you set _EnvLegendreCut := 1..infinity: in Maple, then these CTR functions are the functions it then uses. This is made very clear in their on-line help: "Regardless of the value of b, in the hypergeometric representations above for LegendreP and LegendreQ, when _EnvLegendreCut has the value  the formulas used are obtained from those displayed by replacing the factor  by . " Notice the words "those displayed". Since they display Bateman expressions (14) and (41), this gives the impression that these are the expressions where they make the change (z-1)b/2 → (1-z)b/2 . As explained in various places above, if they really did this, they would have a Q function that was cut on the entire real axis. When Maple tries to compute Q for an argument in the central region, say |z| < 1, it cannot really used (41) since the F function in general diverges, so they really must use (32) or similar, and that is where the change (z-1)b/2 → (1-z)b/2 is in effect made. I suppose this could be checked by studying some Maple evaluations. (b) Question: Do we expect QCTR to be real on the uncut region? Using "my" method of defining the CTR functions, we end up with this: [e-iπμ QCTR] = f2(z,-μ)F(ξ) + f2(z,μ)F(ξ) where if z lies in (-1,1), everything on the RHS will be real. Conversely, if we use "their" method, we get [e-iπμ QCTR] = (41) with z-1 → 1-z Once again, everything on the RHS will be real. With either "my" method or "their" method, we end up with RHS = real. But for general μ, this does NOT cause QCTR to be real due to that phase e-iπμ . So something is wrong, because when we use Maple to compute a CTR value, it is real: Here is what I think they are doing: QCTRMaple = Re(QCTR) Remember that for an ODE like Legendre where everything is real, you have Lu = λu L(Reu + iImu) = λ(Reu + Imu) => L Reu = λ Reu Since L is real for the Legendre equation in z, if u is a solution, then Re(u) is also a solution. So they would then be defining a function QCTRMaple which is in fact a solution of the ODE. 3. The connection between the Classical and the CTR Legendre Functions. (a) Let's consider our p 124 (14) definition of the classical P function. It has this form: Pnμ(z) = A (z+1)μ/2 (z-1)-μ/2 * F where again the L refers only to the red cut associated with the (z-1)-μ/2 factor. According to the discussion above, we have this for the Maple CTR P function: Pnμ(z)CTR = A (z+1)μ/2 (1-z)-μ/2 * F The meanings of (z-1)-μ/2 and (1-z)-μ/2are exactly as presented in Section 6 above, α = -μ/2. So we know then that we can write (z-1)α = e±iαπ (1-z)α Im(z) 0 => (z-1)-μ/2 = e∓iπμ/2 (1-z)-μ/2 and then we get the connection: Pnμ(z) = A (z+1)μ/2 (z-1)-μ/2 * F = e∓iπμ/2 A (z+1)μ/2 (1-z)-μ/2 * F = e∓iπμ/2 Pnμ(z)CTR Im(z) 0 Pnμ(z)CTR = e±iπμ/2 Pnμ(z) Im(z) 0 Here is some evidence that Maple agrees with this claim. First we evaluate PCTR, then we let the restart command reset the env variable to its default and we compute e+iπμ/2 Pnμ(x+iε), then e–iπμ/2 Pnμ(x+iε). The first agrees with PCTR, while the second gives some other value as we would expect. (b) Now we want to do a similar thing for the Q function. Consider p 130 (32), which is [e-iπμ Qnμ(z)] = A (z-1)μ/2 F + B (z-1)-μ/2 F [e-iπμ Qnμ(z)CTR] = A (1-z)μ/2 F + B (1-z)-μ/2 F So we find, using our rule above that (z-1)-μ/2 = e∓iπμ/2 (1-z)-μ/2, [e-iπμ Qnμ(z)] = A (z-1)μ/2 F + B (z-1)-μ/2F = A { e±iπμ/2 (1-z)μ/2 } F + B { e∓iπμ/2 (1-z)-μ/2} F = e±iπμ/2 A (1-z)μ/2 F + e∓iπμ/2 B (1-z)-μ/2F In this case, the two terms got "twisted" in opposite directions, so the result is not a multiple of QCTR. We can write this "the other way" by changing phases: [e-iπμ Qnμ(z)CTR ] = e∓iπμ/2 A (z-1)μ/2F + e±iπμ/2 B (z-1)-μ/2F and then we say the two terms are reverse twisted, so we don't get a classical Q. But here is a way we try to test the above. The first term can be made to vanish if μ = 1+n+N, N=0,1.. due some gamma functions in the formula Bateman (32) for Q. In this case we should get [e-iπμ Qnμ(z)CTR] = e±iπμ/2 B (z-1)-μ/2 F = e±iπμ/2 [e-iπμ Qnμ(z)] Im(z) 0 or Qnμ(z)CTR = e±iπμ/2 Qnμ(z) which is the same as our P relationship. For some reason, our Maple test fails: We first compute QCTR and find, as expected, it is completely real. We then compute the classical Q and apply our phase e+iπμ/2 . We get the correct real part, but we get some non-zero imaginary part! _________________________________________ I have another document called Complex / "What is the cut structure of f(z) = F(a,b,c; z^(-2)).doc" This was an interesting academic exercise. At the end I added some of this CTR stuff and I now move that here as well. Application Consider Bateman p 134 (41) for e-iπμQ: e-iπμQ(z)CTR = C z-1-ν-μ (1-z)μ/2 (z+1)μ/2 F(a,b,c,z-2) Here we have exactly followed Maple's implied rule and have changed the usual z-1 to 1-z in the outside factor. Suppose we now consider a point z such that |z| < 1. The two outside factors have no phase and are positive and real. But for the F, we have to make the above replacement to find out what is really going on there. So here is that replacement (from above), F(a,b,c, z-2) = A e∓iaπ (z)2a F(a,a+1-c; a+1-b; z2) + B A e∓ibπ (z)2b F(b,b+1-c; b+1-a; z2) This certainly appears then to have the cut structure shown above: But let's now insert the expressions for a and b and see if anything unusual happens. From (41), a = 1 + ν/2 + μ/2 b = 1/2 + ν/2 + μ/2 c = ν + 3/2 a+1-c = (1 + ν/2 + μ/2) +1 - (ν + 3/2) = 1/2 - ν/2 + μ/2 b+1-c = (1/2 + ν/2 + μ/2) +1 - (ν + 3/2) = - ν/2 + μ/2 a + 1 - b = (1 + ν/2 + μ/2) + 1 - (1/2 + ν/2 + μ/2) = 3/2 b + 1 - a = (1/2 + ν/2 + μ/2) + 1 - (1 + ν/2 + μ/2) = 1/2 These last are not of any particular interest, since ν and μ are regarded as "general". So we get F(a,b,c, z-2) = A e∓i(1 + ν/2 + μ/2)π (z)2a F(1 + ν/2 + μ/2, 1/2 - ν/2 + μ/2; 3/2; z2) + B e∓i(1/2 + ν/2 + μ/2)π (z)2b F(1/2 + ν/2 + μ/2, - ν/2 + μ/2; 1/2; z2) = e∓i(ν/2 + μ/2)π * A e∓iπ(1) (z)2a F(1 + ν/2 + μ/2, 1/2 - ν/2 + μ/2; 3/2; z2) + B e∓iπ(1/2) (z)2b F(1/2 + ν/2 + μ/2, - ν/2 + μ/2; 1/2; z2) = e∓i(ν/2 + μ/2)π * -A (z)2a F(1 + ν/2 + μ/2, 1/2 - ν/2 + μ/2; 3/2; z2) ∓i B (z)2b F(1/2 + ν/2 + μ/2, - ν/2 + μ/2; 1/2; z2) Then we have Q(z)CTR = e+iπμC z-1-ν-μ (1-z)μ/2 (z+1)μ/2 e∓i(ν/2 + μ/2)π x { -A (z)2a F(1 + ν/2 + μ/2, 1/2 - ν/2 + μ/2; 3/2; z2) ∓i B (z)2b F(1/2 + ν/2 + μ/2, - ν/2 + μ/2; 1/2; z2) } For z = 1/2, and for general ν and μ, the RHS is NOT going to be a real number. Here is Maple confirmation of this claim I have just made: But when we use Maple's "CTR function", we get a different answer! To wit: Hypothesis #1: Maybe Maple does not include the phase e+iμπ on the RHS if doing CTR. Then we have the following where np means "no phase": Interestingly, this hypothesis delivers the correct real part. Hypothesis #2: Maybe Maple does not include the phase e+iμπ on the RHS if doing CTR, and takes the real part when it is done. Then we have the following where np means "no phase". This hypothesis seems always to deliver the right answer when we use close to real arguments! But for general complex arguments, this model does not work: So we now have a little "reverse engineering problem" to try to deduce from probes what it is that Maple is really doing which you tell it to draw the cut to the right. Hypothesis #3: Maybe Maple does it "my way". In this case I select a values of μ and ν which cause Bateman (32) to have only the second term.