# integrating formal Laurent series

I would like to compute some integrals of products of Laurent series, with the goal of getting an explicit expression for the n-th coefficient of the result. It gets pretty messy so I was hoping that sage could keep track of the details for me. Here are the things I don't know how to do:

1) Define a Laurent series by giving an expression for its n-th coefficient.

2) Formally multiply and integrate Laurent series, producing an explicit expression for the n-th coefficient of the result.

Is this possible? I apologize if some or all of this is explained elsewhere.

EDIT: An example of what I want to do would be to define a power series such as sum(n * x^n,n,0,infinity) and then integrate it and/or multiply it by another power series, resulting in yet another power series whose coefficients I can read off. The O(x^n) notation is not very useful to me since I would like to have an expression for an arbitrary coefficient of that resulting series in terms of n.

edit retag close merge delete

Sort by » oldest newest most voted

It is not clear to me what you mean by "giving an expression for the n-th coefficient". Is this what you are looking for?

sage: R.<z> = FractionField(QQ[['z']])
sage: R
Laurent Series Ring in z over Rational Field
sage: (z^-2 + z^3 + 5*z^8 + O(z^10)).integral()
-z^-1 + 1/4*z^4 + 5/9*z^9 + O(z^11)

more