Skip to content

expression series expansion

Iris Lui edited this page Feb 24, 2016 · 13 revisions

The first code for series expansion was a translation of SymPy ring series (the univariate case) using Piranha polynomials with rational coefficients. This has been improved to handle symbolic constants using Piranha polynomials over Expressions so we have now:

In progress:

What's immediately missing from current series IMHO:

  • more functions (bessel, gamma, zeta...)

    NOTE : This is handled by #813, but poles need to be special cased and handled like gamma.

  • implement Taylor series starting point parameter x0

  • continuation of previous: expansion at oo, asymptotics with oo. Example:

>>> y = series(1 / (x+1), x, oo, 3)
>>> str(y)
'x**(-3) - 1/x**2 + 1/x + O(x**(-4), (x, oo))'
  • full multivariate expressions (not sure, maybe 1/(1-x-x*y) works already?) Pari:
? Ser(1/(1-x-x*y)) 
%2 = 1 + (y + 1)*x + (y^2 + 2*y + 1)*x^2 + (y^3 + 3*y^2 + 3*y + 1)*x^3 + ...
  • SymEngine implementation of UPSeriesPiranha with no additional dependencies. (Modify series_generic.h to fit into series.h model)

    NOTE : currently being handled here