Phil Lucht Math & Physics Archive
Home / Math and Physics Files / Math / Curvilinear Systems / Ellipsoidals and Lame / Hobson Related

Understanding the Hobson Lamé Recursion Relation Solutions

DOCX · 211.3 KB
Open DOCX file

Phil's notes dated 11.15.10 working through Hobson's treatment of the K, L, M and N Lamé series (pp. 460-462). They set up a uniform index notation, derive the three-term recursions, and explain why requiring one coefficient to vanish (Plan A) terminates the N and L series but not K. They include Maple computations for n = 2 to 8, comments on Hobson's typos, and a general method for all classes.

AI-written summary; may contain errors.

Extracted text (machine-read; may contain errors)
Understanding the Hobson Lamé Recursion Relation Solutions PhL 11.15.10 I started this confused, and ended up with a uniform and simple way to compute all the series. I really is too bad Hobson has so many typos in this area. Someday I will put this into my on line errata site. I understand it all now, including the determinant method which can be used in any of the classes, but seems not the easiest method to me. (a) A uniform notation for the K series. 1 (b) The recursion relation for the K series 2 (c) Try Plan A for the K series 3 (d) Why does Plan A seem to succeed for the N series? 3 (e) Maple computes N functions for n = 2,3,4,5,6,7,8 5 (f) Does Plan A work for the L and M series? 7 (g) Maple Generation of L Series 10 (h) Back to the K series. 12 (i) Phil's General Method for all classes K,L,M,N 18 Basically I just don't "get it". So I have to take it in a thousand baby steps. (a) A uniform notation for the K series. The matter at hand is presented on pages 460-462. The first potential confusion is the manner in which the series coefficients are defined. Here it is. Index does NOT match the power. K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... If n is even, the series marches down until we get the last term with power μ0. So the exponent sequence will be n, n-2, n-4, ... 0. If n is 2, there will be 2 terms. If n is 4, there will be three terms. If n is 6, there will be four terms. So number of terms is n/2+1. If we have N terms with a0 being the first coefficient, then those coefficients will be a0, a1, a2, .... aN-1 . So if there are n/2+1 terms, then the coefficient index on the last term is n/2. So here is the series n even: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + a n/2-1μ2 + an/2μ0 // n/2+1 terms. ( first vanishing coefficient must be an/2+1) If n is odd, the series marches down until we get the last term with power μ1. So the exponent sequence will be n, n-2, n-4, ... 1. If n is 1, there will be 1 term. If n is 3, there will be two terms. If n is 5, there will be three terms. So number of terms is (n+1)/2. If we have N terms with a0 being the first coefficient, then those coefficients will be a0, a1, a2, .... aN-1 If there are (n+1)/2 terms, then the coefficient index on the last term is (n-1)/2. So here is the series n odd: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + a(n-1)/2-1μ3 + a(n-1)/2 μ1 // (n+1)/2 terms. ( first vanishing coefficient must be a(n-1)/2+1) This is exceedingly clumsy notation. Hobson suggests that we define r ≡ (n even)? n/2 else (n-1)/2 Then we can at least try to write our two K series in a uniform fashion n even: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + a r-1μ2 + arμ0 // r+1 terms. ( first vanishing coefficient must be ar+1) n odd: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + ar-1μ3 + ar μ1 // r+1 terms. ( first vanishing coefficient must be ar+1) This notation causes the low end of both series to look "the same" in terms of this symbol r. We could now combine things together and say any n: // r+1 terms. ( first vanishing coefficient must be ar+1) r ≡ (n even)? n/2 else (n-1)/2 b ≡ (n even)? 0 else 1 (b) The recursion relation for the K series All three recursor cases K, LM, N have this form Aas + Bas-1 + Cas-2 = 0 where A,B and C are functions of n, s, h,k. For the K case we have (says Hobson) 2s(2n+1-2s)as = α { p - (n-2s+2)2} as-1 + β(n-2s+4)(n-2s+3)as-2 α = h2+k2 β = h2k2 This relates as to the two coefficients to the left in the series. Lower means to the left when you are talking the indices of the ai. If we try s = 1, then the as-2 term is not present and we get a1 = poly1(p)a0 The next situation would be a2 = [ linear in p ] a1+ constant a0 = poly2(p). a3 = [ linear in p ] a2+ constant a0 = poly3(p). ... as = polys(p) For possible future use, then, we note in passing that if we "build up" the coefficients using the recursion relations, we will find that as = polys(p) . (c) Try Plan A for the K series We know that we want to have ar+1 = 0 and the same for all coefficients with larger index, so the series won't have any negative powers which blow up at μ= 0 which is illegal. From the above we have, setting s = r+1 , 2[r+1] (2n+1-2[r+1])ar+1 = α { p - (n-2[r+1]+2)2} ar + β(n-2[r+1]+4)(n-2[r+1]+3)ar-1 or (2r+2) (2n-1-2r)ar+1 = α { p - (n-2r)2} ar + β(n-2r+2)(n-2r+1)ar-1 and we see this validated on page 461 on one of the lines. "Plan A" would be to require ar+1 = 0 and hope that makes all subsequent terms vanish. From above, we know that ar+1 = polyr+1(p) so we might hope to find r+1 different values of p which make this happen. Well, suppose we compute these p values and pick one of them. We then have ar+1(pi) = 0. But then the next term in the series says (...) ar+2 = (...) ar+1 + (...)ar = (...)ar So the problem is that getting ar+1= 0 does not cause the series to terminate. It "skips around" the one coefficient we managed to get equal to zero. The series just keeps going and we are no go. We need to have "two in a row" be zero. So it seems that our "Plan A" fails. (d) Why does Plan A seem to succeed for the N series? Let's temporarily jump ahead and look at the N series situation. The difference in the form of the "series part" of K is that it starts with μn-2 instead of with μn. This means we have to revamp all of the above work to make it apply to the N series. He assumes this form, which is the same by 2 idea as K Nseries(μ) = a0μn-2 + a1μn-4 + a2μn-6 + ..... This tiny change still means we have to revamp all the K work done above, so let's just brute force do that right now. But maybe we can take a shortcut. If we take the K case and make these changes (1) set a0 = 0 (2) then set a1= a0, a2= a1 and so on. That is, we do this: ai → ai-1. Our K result was this: any n: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + a r-1μb+2 + arμb // r+1 terms. ( first vanishing coefficient must be ar+1) r ≡ (n even)? n/2 else (n-1)/2 b ≡ (n even)? 0 else 1 Making this change, we get the following, with the understanding that a-1 = 0: ( N = series part) any n: N(μ) = a-1μn + a0μn-2 + a1μn-4 + ..... + a r-2μb+2 + ar-1μb ( first vanishing coefficient must be ar) r ≡ (n even)? n/2 else (n-1)/2 b ≡ (n even)? 0 else 1 Here is the N recursion relation in this case, where I write it for s = r (as he gives) then for s [ I see he has α in the wrong place, I will fix that now below, He has four typos at once! ] 2r(2n+1-2r)ar = α { p - (n-2r+1)2} ar-1 + β (n+2-2r)(n+1-2r)ar-2 2s(2n+1-2s)as = α { p - (n-2s+1)2} as-1 + β (n+2-2s)(n+1-2s)as-2 Recall in the K case we had as = polys(p) ? Looking at how things start on page 462 bottom, we see that this is still true in the N case. Now suppose we again roll out Plan A and require that ar = 0, There will be r solutions for polyr(p) = 0. Fine, that is the right number. But why don't we have the same "skipping problem" we had in the K case with this application of Plan A? Well, let's look at the next term in the series and see if for some magic reason it vanishes: 2[r+1] (2n+1-2[r+1])ar+1 = α { p - (n-2[r+1]+1)2} ar + β (n+2-2[r+1])(n+1-2[r+1])ar-1 or (2r+2) (2n-1-2r)ar+1 = α { p - (n-2r-1)2} ar + β (n-2r) (n-2r-1)ar-1 => (2r+2) (2n-1-2r)ar+1 = β (n-2r) (n-2r-1)ar-1 Now let's study the factor (n-2r) (n-2r-1): n even r = n/2 n-2r = 0 ! n odd r = (n-1)/2 n-2r-1 = n - (n-1)-1 = n-n+1-1 = 0 ! Thus we find that, regardless of whether n is even or odd, the factor (n-2r) (n-2r-1)vanishes. Thus, we do in fact have ar+1 = 0. Then we have "two in a row" vanishing, so we are home free. So this is WHY our Plan A works for the N class and why we get r solutions here. Hobson's cursory text in no way made this clear, but now I get it. While we are here, we have a complete method for constructing the N series. That method is to do the "roll up" to find the polynomial in ar = polyr(p). Then find the r roots of this thing, call them the pi. Then just reel off your coefficients for each i = 1,,,,r. That is to say (..) a1 = (...p..)a0 (..) a2 = (...p..)a1 + (...) a0 = (...p..) [(...p..)a + (...) a0 = poly2(p) (...)a3 = (...p..)a2 + (...) a1 = (...p..) (...p..) [(...p..)a + (...)(...p..)a0 = poly3(p) ...... (e) Maple computes N functions for n = 2,3,4,5,6,7,8 It would be pretty easy to write a Maple program to roll up these polynomials and then find the roots. I have done it! Here is the general idea where I show details for a run with n = 4 We know ahead of time the form N will have in all cases: Nni(μ) = ( μn-2 + a1iμn-4 + a2iμn-6 + ....) so our only task for each n is to compute a1, a2.....ar-1 as shown above. We expect to have r solutions for the pi i = 1,2,3...r and each solution gives a set of coefficients {aki, k = 1,2..} i = 1,2,3...r. I will try to build a little table of the results: n = 2 r = 1 p1 = 1 last coeff is a0 only series term is μ0 = 1 n = 3 r = 1 p1 = 4 last coeff is a0 only series term is μ1 = μ n = 4 r = 2 pi = below last coeff is a1 series is μ2 + a1, 2 solutions n = 5 r = 2 pi = below last coeff is a1 series is μ3 + a1μ1, 2 solutions n = 6 r = 2 pi = below last coeff is a2 series is μ4 + a1μ2 + a2, 2 solutions n = 7 r = 3 pi = below last coeff is a2 series is μ5 + a1μ3 + a2μ1, 3 solutions Results are messy. n = 8 r = 4 pi = below last coeff is a3 series is μ6 + a1μ4 + a2μ2 + a3, 3 solutions In this case, Maple declines to try to find the four roots for pi. Notice that p and α and a1 are L2 for any n, and similarly a2 and β are L4, and so on. In any event, we can make Maple compute any N function we want. If we want coefficients in closed form, we pick some numerical values for h and k (hence α and β) and then let it solve for the roots pi numerically, then we put those roots p in for our a1, a2 etc expressions. (f) Does Plan A work for the L and M series? Things are different here because the assumed form for the L series is this L(μ) = a0μn-1 + a1μn-2 + a2μn-3 + ..... typo! This MUST be a typo. If this is what he really intended, we would have a1= a3= 0 right from the start, that would make no sense at all. So here must be what he means L(μ) = a0μn-1 + a1μn-3 + a2μn-5 + ..... Instead of giving the recursor in our usual form Aas + Bas-1 + Cas-2 = 0 Hobson instead sets s = n-r and writes Aan-r + Ban-r-1 + Can-r-2 = 0 which is fine by me. Specifically this comes out being 2(n-r)(2r+1)an-r = [ α(p - (2r+1-n)2) - (4r+3-2n)k2] an-r-1 + β(2r+2-n)(2r+3-n) an-r-2 If we look at the coefficient buildup, we still get as = polys(p), just looking at the start. Setting s = n-r this says an-r = polyn-r (p) Hobson proposes trying to force an-r = 0 which then would give n-r solutions. To see if Plan A somehow works, we want the next term in the series which is an-r+1. To get there, we have to replace r→r-1 in the form above. Then (....) an-r+1 = (...)an-r + β(2[r-1]+2-n)(2[r-1]+3-n) an-r-1 (....) an-r+1 = (...)an-r + β(2r-n)(2r-n+1) an-r-1 Recall that in our N series analysis, we got a factor (n-2r) (n-2r-1) = (2r-n) (2r+1-n) which is exactly the same factor we see here! So whether n is even or odd, we get (n-2r) (n-2r-1) = 0 so an-r+1 = 0 and then we have our two in a row and we are in fat city. So yes, Plan A works in the L case! Big Hobson Error in Equation E. The LHS is presented wrong in Hobson p 462 E. So I had to run some checks on things. First, I entered D into Maple like so, where we have C1(r)an-r-1 = C2(r) an-r-2+ C3(r)an-r-3 where the coefficients I took from equation D. I then want n-r-1 = s, which means r = n-s-1, so we get a1(n-s-1)as = a2(n-s-1) as-1+ a3(n-s-1)as-2 I then set s = 1 and got Only the first two matter when s = 1 and we see that these two agree with equation B. I then set s = 2 and get and these three agree with equation C. So we know that equation C can generate A and B as special cases. I then go back to the start where I have C1(r)an-r-1 = C2(r) an-r-2+ C3(r)an-r-3 I want to take r→r-1 so that n-r-1→ n-r so that an-r-1 becomes an-r as in E. So I do r→r-1 to get C1(r-1)an-r = C2(r-1) an-r-1+ C3(r-1)an-r-2 and Maple says The second two agree with equation E exactly, but the first does not. This is the Hobson typo I have now fixed in the hard copy. (g) Maple Generation of L Series OK, I first enter the (corrected) coefficients for this 2(n-r)(2r+1)an-r = [ α(p - (2r+1-n)2) - (4r+3-2n)k2] an-r-1 + β(2r+2-n)(2r+3-n) an-r-2 c1(r) an-r = c2(r) an-r-1 + c2(r) an-r-2 If we replace n-r with s here (by setting r = n+s) we get c1(n+s) as = c2(n+s) as-1 + c2(n+s) as-2 So these are the correct coefficients for doing the buildup from a0= 1. We want to run s from 1 up to n-r and then we will solve an-r = 0 for the p which has n-r solutions for pi. First, we write out our known forms Lni(μ) = ( μn-1 + a1iμn-3 + a2iμn-5 + ....) For n = 1 only the leading term μ0 = 1, so L1i(μ) = . We have r=1. I will try to build a table as I did for the N functions n = 1 r = 0 n-r=1 a1= 0 p = k2/α L1i(μ) = n = 2 r = 1 n-r=1 a1= 0 p = 1 + 3k2/α L1i(μ) = μ1 n = 3 r = 1 n-r=2 a2= 0 p =below L1i(μ) = (μ2 + a1i ) p= If we install our first p value into a1 and set α and β we find that Now look at Byerly's claim The inside of his radical is b4 + 4c4 + 4 b2c2 - 5 b2c2 = 4c4 - b2c2 +b4 . We then as before replace x,b,c with our μ,h,k and then Byerly's -5a1 = h2 + 2k2 ± and amazingly enough, we agree! Now continue into uncharted territory: n = 4 r = 2 n-r=2 a2= 0 p =below L1i(μ) = (μ3 + a1iμ1 ) p= If we install our first p value into a1 and set α and β we find that So with both root signs we get our two a1i values. Continuing along: n = 5 r = 2 n-r=3 a3= 0 p =below L1i(μ) = (μ4 + a1iμ2 + a2i ) i = 1,2,3 This time the roots are quite messy and even seem to be complex which conflicts with a claim. I think if you put in numbers, you will find that the imaginary part goes away. Maple had to solve a cubic, and we know how misleading the expressions can look. So time to stop! (h) Back to the K series. We have showed that for all the other classes, if you set a certain at = 0, you successfully truncate the series due to the special way the next term looks which makes it be 0 for both r values, and we call this Plan A. We showed that N class: ar(p) = 0 r solutions L,M class: an-r(p) = 0 n-r solutions in each class But Plan A fails for the K class, so we need a new Plan. How do we keep the series from going on forever? any n: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + a r-1μb+2 + arμb // r+1 terms. ( first vanishing coefficient must be ar+1) r ≡ (n even)? n/2 else (n-1)/2 b ≡ (n even)? 0 else 1 Plan A would have us just set ar+1(p) = 0, but we know that does not work because it jumps around this isolated 0 value. Plan B: What happens if we try out a declared finite series of the above form, having just the r+1 terms shown above. We put this finite series into the Lamé ODE and we get a set of recursion relations. Normally with the infinite series, one of those recursors would say (...)ar+1 = (..)ar + (...)ar-1 My confusion is simple: what happens to this recursor? Let's do an example. Let K = μ2 + a1. Jam this into p 460 G. ∂μK = 2μ ∂μ2K = 2 (μ2-h2) (μ2-k2) 2 + μ (2μ2-h2-k2)2μ + { p(h2+k2)-6μ2} (μ2+a1) = 0 (μ4 - αμ2+β)2 + μ (2μ2-α)2μ + { pα-6μ2} (μ2+a1) = 0 (2μ4 - 2αμ2+2β) + (4μ4-2αμ2)+ { -6μ4 + μ2(pα- 6a1) + pαa1 ) = 0 μ4 [ 2 + 4 - 6 ] + μ2[ -2α -2α + pα - 6a1] + μ0[ 2β + pαa1] = 0 μ2[ -4α + pα - 6a1] + μ0[ 2β + pαa1] = 0 We are supposed to "balance the powers". I though each [...] would end up being a recursor. But the first recursor is in fact this 6a1 = α(p-4) = αp - 4α // balances the power μ2 The second recursor is this (this is the one for a2, but a2 = 0) 0 = α { p }a1 +β2 This is the power balance for the μ0 term. This then is then (we have r = n/2 = 1) 0 = (...)ar+1 = (..)ar + (...)ar-1 So this recursor does not go away, you have it with a 0 LHS and you have to satisfy it. Now the second recursor says a1= -2β/αp and if we put that into the first recursor, we get 6 [-2β/αp] = αp-4α -12 β/α2 = p2-4p => -12β = α2p(p-4) agrees with p 464-star p2 - 4p + 12β/α2 = 0 p = (4 ± [ 16-4*12(β/α2)]1/2}/2 = (2 ± [ 4-12(β/α2)1/2] = 2(1 ± [ 1-3(β/α2)1/2] So this then is the mechanism that forces your p values. You really DO satisfy the last recursor, you don't throw it away. What about the NEXT recursor after that" (...)ar+2 = (..)ar+1 + (...)ar (...)a3 = (..)a2 + (...)a1 In my example, there WAS no next recursor like this. I only got two recursors. (i) An explanation of the K determinant. If you assume a finite series for K any n: K(μ) = a0μn + a1μn-2 + a2μn-4 + ..... + a r-1μb+2 + arμb // r+1 terms. ( first vanishing coefficient must be ar+1) r ≡ (n even)? n/2 else (n-1)/2 b ≡ (n even)? 0 else 1 and if you insert this finite series into the Lamé ODE, and if you "balance the powers", for each power you get an expression = 0 which is the recursor for that power. For example, here is some code The last line shows the Lamé equation and the three recursors. The last recursor on the right, associated in this case with the μ0 power, can be interpreted as this one (...)ar+1 = (..)ar + (...)ar-1 ie (...)a3 = (..)a2 + (...)a1 There IS NO coefficient ar+1 ever, and in this case there is no a3. So the last recursor looks like this: 0 = (..)ar + (...)ar-1 ie 0 = (..)a2 + (...)a1 Since this is one of the power balance equations, it must be satisfied with 0 as the LHS. So you really can say that you need ar+1(p) = 0 as the condition on the p's! This will have r+1 solution values of p. The rollups for the ai will then be the solution ai. We could just say this and then there is no need for a determinant! Now when we assumed an infinite series descending forever, we had to worry about the NEXT recursion relation which was (...)ar+2 = (..)ar+1 + (...)ar and we had the "jump over" problem to worry about. But if you assume the finite series as we have done here, then such a recursor does not exist. It would be balancing perhaps μ-2 but there are no such powers in the ODE. There are only going to be r+1 recursors and the last one will be 0 = (..)ar + (...)ar-1. There are no more!!!! In our example, r = 2 and we hare r+1 = 3 recursors, one for each power balance, and you see them above in the example. If we set n = 5, we still have r = 2 and the powers are There are only r+1 = 3 recursors here, although the last one is the power of μ1 instead of μ0 now. If we go to n= 6, then r = 3 and the above becomes and there are only 4 recursors. So here are two main points so far: If you assume a finite series as we do, then (1) the last recursor is (...)ar+1 = (..)ar + (...)ar-1 which appears as 0 = (..)ar + (...)ar-1. (2) there are no more recursors. We always have an "algorithm" for computing the ai and I just call it "the rollup". You start with the lowest recursor and compute a1, then a2 and so on, and the last recursor is really an expression of ar+1. Now, if you just use "any old" value of p, you will find that ar+1 ≠ 0. You need to solve ar+1(p) = 0 to find the r+1 values of p that work! Hobson could have just said that and been done with it. This is after all how he deals with the N and L cases! So where does the determinant come in? Yes, we can think of the r+1 recursors as being the statement of a matrix equation a = 0 where the last equation is showing ar+1 = 0. If we pick a bad p, we know this equation will NOT have any solutions because we will have (..)ar + (...)ar-1 ≠ 0 . If we pick a good p, we do have a non-trivial solution set which we find by solving ar+1(p) = 0 for the pi and then using the rollup solutions. In this case, we can ask: what can be said about det(M) ? If detM ≠ 0, we could invert the above and we would be forced to say that ONLY solution is ai = 0 for all i. But since we know we have a solution, it must be true that detM = 0. But this detM = 0 is a poly of degree r+1 in p. It must be the SAME polynomial that you get by setting ar+1(p) = 0 . I could probably formally prove this, but really I have already done so. I think this same "determinant method" could be applied to the N and L functions as well. In those cases, you assume a finite sum for the series part, and do just what we are doing here. Computationally, I think setting ar+1(p) = 0 is easier to implement in code, as I have done. You have a little code loop like this which instantly builds up your as and then when you get the last one, you set it to 0. For the N and the L cases, here is what we found earlier: N require ar(p) = 0 and this gives r solutions L require an-r(p) = 0 and this gives n-r solutions K require ar+1(p) = 0 and this gives r+1 solutions But why don't these requirements all look the same? r ≡ (n even)? n/2 else (n-1)/2 -r ≡ (n even)? -n/2 else -(n-1)/2 n-r ≡ (n even)? n-n/2 else n-(n-1)/2 n-r ≡ (n even)? n/2 else (n-1)/2+1 n-r ≡ (n even)? r else r+1 So the really are similar if you replace n-r by r or r+1. The question is whether or not there is a +1. We know the different series start from different points plus we always have the two cases, so that accounts for this small difference. I think I could handle all three cases in a uniform manner somehow. Any series looks like this where we adjust I for the classes as I have done elsewhere. E(μ) = a0μn-I + a1μn-I-2 + a2μn-I-4 + ..... The only question is: what is the coefficient that you must set to 0? If the terms are akμq we can see that for all terms we have q+2k = n-I. There are two possible ways the series can end: q = 1 => 2k = n-I-1 => n-I = odd k = (n-I-1)/2 q = 0 => 2k = n-I => n-I = even k = (n-I)/2 The last term in the series will be ak with this k. We will require that ak+1(p) = 0. But look back at my old J thing n-I = even => J = (n-I)/2 and select 1 in [ 1, μ] n-I = odd => J = (n-I-1)/2 and select μ in [ 1, μ] so in either the above cases, k is exactly my "J". Therefore we have E(μ) = a0μn-I + a1μn-I-2 + a2μn-I-4 + ..... + aJ [ 1, μ] The requirement is simply that aJ+1(p) = 0 in all cases!!! Let's then compare my unified solution to those found above. K: I = 0 so J = (n even)? n/2 else (n-1)/2 so J = r. Requirement is then ar+1(p) = 0, correct. N: I = 2 so J = (n even)? (n-2)/2 else (n-3)/2 = (n even)? n/2-1 else (n-1)/2-1 = (n even)? r-1 else r-1 So for the N case, we have J = r-1 and our requirement aJ+1(p) = 0 becomes ar(p) = 0, correct. L: I = 1 so J = (n even)? (n-I-1)/2 else (n-I)/2 = (n even)? (n-2)/2 else (n-1)/2 = (n even)? r-1 else r Therefore we have n even => aJ+1 = ar n odd => aJ+1 = ar+1 I think we are in full agreement. Case L above gave n-r ≡ (n even)? r else r+1 which matches. (i) Phil's General Method for all classes K,L,M,N In all cases the series in question has this form E(μ) = a0μn-I + a1μn-I-2 + a2μn-I-4 + ..... + aJ [ 1, μ] where I = 0 for K I=1 for L,M I=2 for N n-I = even => J = (n-I)/2 and select 1 in [ 1, μ] n-I = odd => J = (n-I-1)/2 and select μ in [ 1, μ] The equation which determines the legal p values is simply this: aJ+1(p) = 0 and you determine this from the roll-up of the appropriate recursors for each case. You could alternatively form the determinant which will be (J+1)x(J+1) and there will be J+1 solutions. Here are the three recursors: K: 2s(2n+1-2s)as = α { p - (n-2s+2)2} as-1 + β(n-2s+4)(n-2s+3)as-2 L: 2s(2n+1-2s)as = [α{ p - (n-2s+1)2} - (2n-4s+3)k2] as-1 + β(n-2s+2)(n-2s+3)as-2 N: 2s(2n+1-2s)as = α { p - (n-2s+1)2} as-1 + β(n-2s+2)(n-2s+1)as-2 [ Note: these are confirmed on page 20 of H G Walter's pdf in this folder! He does not mention the Hobson typos. ] The LHS's are all the same! Dimensions look good now. You usually just set a0 = 1 for any series. So I now have a method and code that can compute any Lamé function (first kind). The lower ones analytically, but when the p equations become quintics and above, there are no closed form solutions and you do it numerically! The following table shows, in its last column, how many functions there are of each class for a given value of n, and it shows that the total number is always 2n+1 : class I n-I J J J+1 n even K 0 even (n-I)/2 n/2 n/2+1 n even L 1 odd (n-I-1)/2 n/2-1 n/2 n even M 1 odd (n-I-1)/2 n/2-1 n/2 n even N 2 even (n-I)/2 n/2-1 n/2 2n+1 class I n-I J J J+1 n odd K 0 odd (n-I-1)/2 (n-1)/2 (n+1)/2 n odd L 1 even (n-I)/2 (n-1)/2 (n+1)/2 n odd M 1 even (n-I)/2 (n-1)/2 (n+1)/2 n odd N 2 odd (n-I-1)/2 (n-3)/2 (n-1)/2 2n+1  The following table then shows explicitly the number of functions of each class for n = 1 thru 8: n = 0 1 2 3 4 5 6 7 8 K 1 1 2 2 3 3 4 4 5 L 0 1 1 2 2 3 3 4 4 M 0 1 1 2 2 3 3 4 4 N 0 0 1 1 2 2 3 3 4 1 3 5 7 9 11 13 15 17 So for a given class, there are J+1 p values which we obtain from aJ+1(p) = 0. For each pi value, we construct a list of coefficients {a0, a1, ... aJ} using the roll up, and there are J+1 coefficients. The roll up makes clear that if we double a0, we will double all the other coefficients and we get basically the same Lamé function, so there are really only J degrees of freedom. If we set a0 = 1 by fiat, then there are in fact only J coefficients we need to calculate, although there are J+1 values pi.