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

A Maple study of Bateman Q (40)

DOCX · 172.5 KB
Open DOCX file

A Maple study dated 2.23.10 (note added 2.26.10) by Phil. He enters Bateman's form (40) for LegendreQ in Maple, checks it matches the built-in function in all quadrants, and finds Maple cannot symbolically show it solves the Legendre ODE. Numerical substitution gives zero, also for each of the two hypergeometric terms separately, and he explains how Maple's evalf/LegendreQ code works. Equations and output are missing from the extracted text.

AI-written summary; may contain errors. This description is approximate.

Extracted text (machine-read; may contain errors)
A Maple study of Bateman Q (40) PhL 2.23.10 Our first order of business is to get the two expressions entered: I think I have checked all this several times, but let's test it in the following way: I tried all the quadrants, they always match. So I think this proves conclusively that (1) the Bateman form (40) does not contain any typos; (2) I have transcribed it correctly into Maple. Now, consider: If we compute something, we find that tt = 0. Different formulas were used of course, since I think Maple uses (41) for Q, and thus we pick up rounding error as expected (reduce with Digits if you want). Question #1: Is there some way for Maple to understand that tt ≡ 0 ??? This was a good question, and I ended up writing " How to see internal Maple code.doc" and I can now answer the question. The LegendreQ function call takes you to a piece of code called evalf/LegendreQ that is quite elaborate and uses various Bateman forms to avoid divergent Γ functions and such things. So there is no single hypergeom call that it uses -- many are used. So LegendreQ is really just the name of a piece of code that is used to evaluate LegendreQ, it is not just a simple function like one of the Bateman forms. It is not a symbolic function that you can do "anything" with. The only other thing Maple can do with LegendreQ is diff it. And it seems able to simplify a little bit with the various shift formulas, but I did not study this much. I was able to show that Maple knows it solves the ODE: Question #2: Does Maple know that form Q (40) solves the Legendre ODE? The answer seems to be no. Here is why I say that. First we set t equal to our Q (40) form: Then I jam this into the Legendre ODE: g := -(1-z^2)*diff(t,z,z) + 2*z*diff(t,z) + ( m^2/(1-z^2) - n*(n+1))*t:simplify(%); I know this equation is correct visually and because in the above-mentioned doc I shows that it gives 0 is you put in LegendreQ. But with the hypergeom form above, it generates a huge mess which involves several different hypergeom functions, simplify(%,hypergeom) does not help. So there must be some connection between these hypergeom guys that it does not know about. Showing that all of Q (40) and each separate term satisfies the Legendre ODE. What we can do is pick certain values for n,m,z and THEN it will give 0 to show that the ODE is satisfied. In order to make this work, I have to get rid of the sign(Im(z)) functions because these get tripped up in the derivatives. So here is my new code. First, here are the sign-removed terms: Q40_1 := (n,m,z) ->(Pi)^(1/2)*2^(m-1)*g1(n,m)*exp(I*Pi*(m-n-1)/2)*(z-1)^(-m/2) *(z+1)^(-m/2)* hypergeom([-n/2-m/2, 1/2+n/2 -m/2],[1/2],z^2); Q40_2 := (n,m,z) -> (Pi)^(1/2)*2^(m)*g2(n,m)*exp(I*Pi*(m-n)/2)*z*(z-1)^(-m/2) *(z+1)^(-m/2)* hypergeom([ 1/2-n/2 -m/2, 1+n/2 -m/2],[3/2],z^2); Then we define "t" as follows and look at it: So there is the Q (40) where we assume Im(z) > 0. Now we do the ODE: The expression is the big mess with various HGF's, but when we insert some values, we get 0. We can now finally show that this is true for each term separately: This is what I wanted to show and ended up spending all day doing it, as usual. Maple cannot simplify the analytic forms enough, getting mixtures of HGF's, but when you put in some numbers, you really do get zero. If you do specific cases like Q1(z), you can make Maple show more analytically that the two terms satisfy the ODE. In doing this, you usually have to convert to standard functions and all that stuff. Note added 2.26.10. I have tried to find counterexamples to the claim that each term separately solves the Legendre ODE, but cannot find any, using the above evaluation method. I vary n,m,z a bit. Integer 1,1 and non-integer 1.2,2.3 and a complex z.