# Obtain series expansions using Frobenius Method

Posted 1 month ago
318 Views
|
4 Replies
|
1 Total Likes
|

## Fail Cases

Series[Exp[-2 Pi/Sqrt Hypergeometric2F1[1/2, 1/2, 1, 1 - x]/Hypergeometric2F1[1/2, 1/2, 1, x]], {x, 0, 5}]
Series[Exp[-2 Pi/Sqrt Hypergeometric2F1[1/3, 2/3, 1, 1 - x]/Hypergeometric2F1[1/3, 2/3, 1, x]], {x, 0, 5}]
Series[Exp[-2 Pi/Sqrt Hypergeometric2F1[1/4, 3/4, 1, 1 - x]/Hypergeometric2F1[1/4, 3/4, 1, x]], {x, 0, 5}]
Series[Exp[-2 Pi Hypergeometric2F1[1/6, 5/6, 1, 1 - x]/Hypergeometric2F1[1/6, 5/6, 1, x]], {x, 0, 5}] Looks like something is going wrong on your end. Or try typing one of these into Wolfram|Alpha: No response is slightly better than printing out nonsense, but why shouldn't we try and do better? I asked Bill Gosper, and he also thinks these expansions need to be fixed. We could try to do something like this:

## Frobenius Method

TSol[PFCS_, nMax_] := With[{TAnsatz = {
Dot[a1 /@ Range[0, nMax], x^Range[0, nMax]],
Plus[Log[x] Dot[a1 /@ Range[0, nMax], x^Range[0, nMax]],
Dot[a2 /@ Range[0, nMax], x^Range[0, nMax]]]} /. {a1 -> 1,
a2 -> 0}},  TAnsatz /.  Solve[# == 0 & /@
Flatten[CoefficientList[#, {x, Log[x]}][[1 ;; nMax]
] & /@ Dot[PFCS, D[TAnsatz, {x, #}] & /@ Range[0, 2]]],
Flatten[{a1 /@ Range[1, nMax], a2 /@ Range[1, nMax]}]
][] /. {a1[_] -> 0, a2[_] -> 0}]

MapThread[With[{f1 = TSol[{#1 - 1, #1^2 (-1 + 2 x), #1^2 (-1 + x) x}, 14]},
Expand[1/#2 Normal[Series[Exp[f1[]/f1[]], {x, 0, 10}]] /.  x -> #2 x]]
&, {{2, 3, 4, 6}, {16, 27, 64, 432}}]

Out[]:= {
x + 8 x^2 + 84 x^3 + 992 x^4 + 12514 x^5 + 164688 x^6 + 2232200 x^7 +  30920128 x^8 + 435506703 x^9 + 6215660600 x^10,
x + 15 x^2 +  279 x^3 + 5729 x^4 + 124554 x^5 + 2810718 x^6 + 65114402 x^7 + 1538182398 x^8 + 36887880105 x^9 + 895303119303 x^10,
x + 40 x^2 + 1876 x^3 + 95072 x^4 + 5045474 x^5 + 276107408 x^6 + 15444602248 x^7 + 878268335296 x^8 + 50588345910799 x^9 +  2944021398570264 x^10,
x + 312 x^2 + 107604 x^3 + 39073568 x^4 + 14645965026 x^5 + 5609733423408 x^6 + 2182717163349896 x^7 +  859521859502348352 x^8 + 341679883727799750159 x^9 + 136868519056531319862408 x^10
}


I'm also willing to give a talk as to why I think these are important evaluations and how they fit into the wider context of what we can possibly hope to accomplish using Mathematica.

PS. Don't feel too bad, other than A005797, these expansions are not in OEIS either. Answer
4 Replies
Sort By:
Posted 1 month ago
 Thank you for pointing out this weak spot. I am now making some changes to better support these exponentials. So in a future release the first example will give the result below. x^(2/Sqrt)*SeriesData[x, 0, {2^(-8/Sqrt), 1/(2^(8/Sqrt)*Sqrt), (2^(-5 - 8/Sqrt)*(16 + 13*Sqrt))/3, (2^(-5 - 8/Sqrt)*(117 + 85*Sqrt))/27, (2^(-14 - 8/Sqrt)*(49544 + 34293*Sqrt))/27, (2^(-14 - 8/Sqrt)*(629835 + 424286*Sqrt))/405}, 0, 6, 1] Answer
Posted 1 month ago
 Hi Daniel,Oh no! There was a copy-paste error in the first expansion, it was supposed to be: Series[Exp[-Pi Hypergeometric2F1[1/2, 1/2, 1, 1 - x]/Hypergeometric2F1[1/2, 1/2, 1, x]], {x, 0, 5}] and you can test the following by series expansion: Exp[-Pi Hypergeometric2F1[1/2, 1/2, 1, 1 - x]/Hypergeometric2F1[1/2, 1/2, 1, x]] == EllipticNomeQ[x] So that first one actually seems to work okay. The other three expansions are more of a concern, they come from Ramanujan's theory, and appear as examples in Bruce Berndt's "Ramanujan's Notebooks Vol. II" ( on p.80-82). Does your fix cover those examples as well?I may be around the office tomorrow afternoon if you want a better explanation, or to see a few more examples I've cooked up.--Brad Answer
Posted 1 month ago
 All four of the original examples will give more "expanded" expansions in future. Here is the second one, pared back for brevity. Series[Exp[-2 Pi/Sqrt Hypergeometric2F1[1/3, 2/3, 1, 1 - x]/Hypergeo metric2F1[1/3, 2/3, 1, x]], {x, 0, 1}] // InputForm (* Out//InputForm= x^((2*Pi)/(Sqrt*Gamma[1/3]*Gamma[2/3]))* SeriesData[x, 0, {E^((4*EulerGamma*Pi)/(Sqrt*Gamma[1/3]*Gamma[2/3]) + (2*Pi*PolyGamma[0, 1/3])/(Sqrt*Gamma[1/3]*Gamma[2/3]) + (2*Pi*PolyGamma[0, 2/3])/(Sqrt*Gamma[1/3]*Gamma[2/3])), (-4*E^((4*EulerGamma*Pi)/(Sqrt*Gamma[1/3]*Gamma[2/3]) + (2*Pi*PolyGamma[0, 1/3])/(Sqrt*Gamma[1/3]*Gamma[2/3]) + (2*Pi*PolyGamma[0, 2/3])/(Sqrt*Gamma[1/3]*Gamma[2/3]))*Pi* (2 + PolyGamma[0, 1/3] + PolyGamma[0, 2/3] - PolyGamma[0, 4/3] - PolyGamma[0, 5/3]))/(9*Sqrt*Gamma[1/3]*Gamma[2/3])}, 0, 2, 1] *) Answer
Posted 1 month ago
 Hi Daniel,I think this looks okay. The other "hacker" way to do the calculation is: Normal@Series[ x Exp[ FullSimplify@CoefficientList[ Normal@ Series[- 2 Pi /Sqrt Hypergeometric2F1[1/3, 2/3, 1, 1 - x] /Hypergeometric2F1[1/3, 2/3, 1, x], {x, 0, 10}], Log[x]][]], {x, 0, 3}] Outputs: Out[]:=(1/27)*x + (5 /243)*x^2 + (31/2187)* x^3 And the integerization is as above. There is another question as to whether the output should be a series with rational coefficients or lots of Gamma, PolyGamma whatever. I guess it doesn't matter if FullSimplify then works, nice. You are the expert, so I guess I will just leave it up to you from here, thanks though. This is much better than the original call.--Brad Answer