# InverseSeries producing unacceptable results

I am attempting to invert an expression numerically using Series and InverseSeries.

For example, consider the expression

Jx = (2 Sqrt[Ex])/Pi EllipticE[u1/Ex];


To do so I try

Series[Jx, {Ex, ∞, 5}]
InverseSeries[Series[Jx, {Ex, ∞, 5}]]


But this gives an obviously false result. To see that it's false, it's easier to just compare these two:

Series[Jx, {Ex, ∞, 5}]
InverseSeries[InverseSeries[Series[Jx, {Ex, ∞, 5}]]]


which gives an entirely different series. Inverting the series twice should give the same thing back.

My first thought was that InverseSeries expands around 0, while I'm trying to expand around ∞. But the same issue can be seen by comparing two outputs where we expand around 0, but the first term is infinite at 0:

3 x^(-1/2) + 5 x^(1/2) + 12 x^(3/2) + O[x]^(5/2)
InverseSeries[InverseSeries[3 x^(-1/2) + 5 x^(1/2) + 12 x^(3/2) + O[x]^(5/2)]]


There removing the first term would cause the two lines to give the same result.

My second thought was that I could get around this by defining the inverse ExI = 1/Ex and expand around 0 using that, but this didn't change anything.

So I have these questions:

• Is InverseSeries really limited in the ways I describe? (Always inverts around 0, can't deal with infinite first term)

• How can I invert my expression, either with or without InverseSeries?

• Perhaps Sqrt[1/ExI] InverseSeries[1/Sqrt[1/ExI] Series[Jx /. Ex -> 1/ExI, {ExI, 0, 5}]]? Jun 16 '17 at 2:55

I think InverseSeries has an issue here, but we can manipulate it's output to provide the correct series. Here is your expression (modified slightly):

J[u_, x_] := (2 Sqrt[x])/Pi EllipticE[u/x]


Now, the series expansion of J:

ser = Series[J[u, x], {x, Infinity, 5}];
ser //TeXForm


$\sqrt{x}-\frac{1}{4} u \sqrt{\frac{1}{x}}-\frac{3}{64} u^2 \left(\frac{1}{x}\right)^{3/2}-\frac{5}{256} u^3 \left(\frac{1}{x}\right)^{5/2}-\frac{175 u^4 \left(\frac{1}{x}\right)^{7/2}}{16384}-\frac{441 u^5 \left(\frac{1}{x}\right)^{9/2}}{65536}+O\left(\left(\frac{1}{x}\right)^{11/2}\right)$

Next, the output of InverseSeries:

inv = InverseSeries[ser];
inv //TeXForm


$\frac{1}{x^2}+\frac{u}{2}+\frac{u^2 x^2}{32}+\frac{5 u^4 x^6}{8192}+O\left(x^{10}\right)$

The problem with this output is that the series is being expanded around $x=0$ and not $x=\infty$. Let's rewrite it so that it is in the expected form:

new = Series[Normal[inv] /. x->1/y, {y, Infinity, 10}];
new //TeXForm


$y^2+\frac{u}{2}+\frac{u^2}{32 y^2}+\frac{5 u^4}{8192 y^6}+O\left(\left(\frac{1}{y}\right)^{11}\right)$

I think this is the correct inverse series. Let's turn this into a function, and see if it is indeed the inverse of J:

IJ[u_, y_] := Evaluate[Normal[new]]


Here are a couple examples:

J[2, 1.220*^10]
IJ[2, J[2, 1.220*^10]]

J[20, 1.320*^20]
IJ[20, J[20, 1.320*^20]]


109544.51149646886805

1.2000000000000000000*10^10

1.1401754250991379791*10^10

1.3000000000000000000*10^20

So, the above evidence supports the fact that the function IJ is the inverse of J, and hence new is the inverse series of the series of J.

• This does seem to work, and I can verify the first three terms with pencil and paper. Thanks! However I don't entirely understand why that worked. My understanding is that expanding around x=0 and x=inf are distinctly different things. Yet somehow you took the former, replaced x->1/y, expanded around y=inf (which is the same as x=0) and that worked? Can you clarify the reasoning for me?
– Max
Jun 16 '17 at 21:21
• P.S. Happy to learn about Normal
– Max
Jun 16 '17 at 21:21