# Knowing the expansion of a function, how can we find its expansion using the inverse of x?

If we have a function like:

$$\text{f[x\_]:=}\sum _{i=0}^{\infty } a_ix^i$$

where we can find / know the $$a_i$$ coefficients, but not really for which function it will converge.

How can we find $$f[x]$$ but using the inverse of $$x$$ instead? Something like this?

$$\text{f[x\_]:=}\sum _{i=0}^{\infty } \frac{b_i}{x^i}$$

The main problem is that the first form of $$f[x]$$ does not converge properly for positive values greater than one, since it comes from a Taylor series.

Edit:

I've seen an interesting strategy that we could use to find the inverse of $$f[x]$$, but not really the other form of $$f[x]$$ that I'm looking for, but maybe this could help us to find an strategy:

Series Reversion

Attempts:

Using Mathematica I tried:

$$\text{CoefficientGenerator[i\_]:=...}$$

$$\text{f[x\_]:=}\sum _{i=0}^{\infty } \text{CoefficientGenerator[i]}x^i$$

$$\text{Series[f[x], \{x, \infty , 5\}]}$$

but this doesn't work, I receive my input as an output. If the CoefficientGenerator function is something that it already knows (like the expansion of $$e^x$$), it works:

$$\text{CoefficientGenerator[i\_]:=}\frac{1}{\text{Gamma}[i+1]}$$

The result for this case is:

$$\exp \left(\log (e) x+O\left(\left(\frac{1}{x}\right)^4\right)\right)$$

• The so-called connection problem is difficult in general. A lot is known if the series concerned correspond to hypergeometric functions, but there is still a lot of research necessary for e.g. solutions of Heun or Painlevé equations. Anyway, this is more a math question than a Mathematica one. May 26 '20 at 12:01
• Hum, interesting, if not asking too much, do you remember a link from where I could read more about this? I'll also be googling as well. I've seen that Mathematica works for series that are already know, if I expand using infinity, for example, but for functions constructed like mine, not really, unfortunately. May 26 '20 at 12:12

It looks like we can do something like this:

Define f1 as:

$$f1(x, order) = \sum _{i=0}^{order} a_ix^i$$

(where we know the $$a_i$$s from the CoefficientGenerator function).

Define f2 as:

$$f1(x, order) = \sum _{i=0}^{order} \frac{b_i}{x^i}$$

(where the $$b_i$$s are the coefficients that we want to find).

Since, $$f1(x, order)=f2(x, order)$$, when order tends to $$\infty$$, by definition, we could do:

$$f1(1-x, order)=f2(1-x, order) \implies \sum _{i=0}^{order} a_i(1-x)^i = \sum _{i=0}^{order} \frac{b_i}{(1-x)^i}$$.

Then we can expand the left and the right side and using a system of equations find the $$b_i$$s (since we can expand $$\frac{1}{(1-x)^i}$$ more easily).

But the difficulty now is, how can we implement this using Mathematica?

f1[x_, order_] := ...

f2[function_, x_, order_] := ...

f2[f1, x, 10] (* This will give the f2 function in x until order 10. *)


One attempt of mine, a bit ugly for now, is this one, I'd like to simplify it or rewrite it in a better form.

With[
{
order = 10
},
f1[x_, order_] := \!$$\*UnderoverscriptBox[\(\[Sum]$$, $$i = 0$$, $$order$$]$$a[i] \*SuperscriptBox[\(x$$, $$i$$]\)\);
f2[x_, order_] := \!$$\*UnderoverscriptBox[\(\[Sum]$$, $$i = 0$$, $$order$$]
\*FractionBox[$$b[i]$$,
SuperscriptBox[$$x$$, $$i$$]]\);
reduce = Reduce[
f1[1 - x, order] == Series[f2[1 - x, order], {x, 0, order}],
Array[b, order + 1, 0]
];
rules = {ToRules[reduce]}[[1]];
f3[x_, order_] := \!$$\*UnderoverscriptBox[\(\[Sum]$$, $$i = 0$$, $$order$$]
\*FractionBox[$$b[i] /. rules$$,
SuperscriptBox[$$x$$, $$i$$]]\)
]