Series Reversion
I have a rational polynomial y(x) = P(x)/Q(x) f(z) = P(z)/Q(z) which I want to revert (I'm trying to find the inverse of y).
y(x) is a symbolic expression f).
I'll pick a simple example, the function f(z) = (1/z-1)^4
[sage:] z = var('z');
[sage:] z = FractionField(PolynomialRing(QQ, 'z')).objgen();
[sage:] f(z) = (1/z-1)^4;
[sage:] g = f(z).taylor(x,2,4); #I expand f in SAGE. In order to use g = y.reversion()
I have to convert the symbolic expression to a power series. y(x) looks like this
x^2*f1((3/x-1)^m,(1/x-1)^m) / (const + f2((3/x-1)^n,(1/x-1)^n)))
The numerator
a Taylor series just to make sure it's a series
[sage:] f.expand().reversion();
AttributeError: 'sage.symbolic.expression.Expression' object has higher degree than the denominator. - When I do
y(x).power_series(QQ)
SAGE returns
[sage]: TypeError: unable to convert 45*(256*sqrt(2))*e to a rational
- When I try
y(x).power_series(RR)
it tells me
[sage]:
no
attribute 'reversion'
[sage:] g1 = g.power_series(QQ);
TypeError: denominator must be a unitunit
[sage:] g.reversion();
AttributeError: 'sage.symbolic.expression.Expression' object has no
attribute 'reversion'
Am
A power series P(z) is not a rational function P(z)/Q(z). That's why the TypeError: denominator must be a unit appears.
Is it possible that SAGE cannot invert rational polynomials? In the SAGE help text the computation is passed to pari first, before using Lagrangian inversion.
I missing some algebra?thought SAGE uses FLINT. Why is it not used for computing the inverse of rational polynomials?