Symbolic sum/product of Laurent/power series

asked 2019-04-26 19:44:06 +0200

Road gravatar image

How can I do something like this?

#f = some Laurent/power series in x e.g. 
#a,b,w are symbolic such that e.g. 2*w**2 = 3
f = 1/x + w + a*x + b*x**2 + ((a+b)/w)**2*x**3 + O(x**7)
#g[i] = some power series in x derived from f, c[i], d[i], e.g.
g[i] = (x*f + c[i])/(d[i]*f + x**2)
#product of n first g[i]
#n is symbolic
G = product(g[i], i=1..n)
#extract coefficients of x in G
G.coeff(x,-1), G.coeff(x,0), G.coeff(x,1)

Thank you.

edit retag flag offensive close merge delete

Comments

You should clarify your question by explaning in detail a single example of what you are trying to achieve. "something like this" is not clear at all (at least to me). Also, in the snippet you wrote, there is no explanation of what c[i] and d[i] are supposed to be.

vdelecroix gravatar imagevdelecroix ( 2019-04-27 22:35:39 +0200 )edit

c[i] and d[i] are indexed symbolic variables. I'm trying to do symbolic calculation on power/Laurent series and extract the coefficients at the end. The snippet I wrote was my single example in detail. The tricky part about this for me is the symbolic variables n, c[i], and d[i]. I need to coefficients at the end to be expressed in forms of sums or products running over i.

Road gravatar imageRoad ( 2019-04-30 02:07:59 +0200 )edit