ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 29 Apr 2019 19:07:59 -0500Symbolic sum/product of Laurent/power serieshttps://ask.sagemath.org/question/46367/symbolic-sumproduct-of-laurentpower-series/ 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.Fri, 26 Apr 2019 12:44:06 -0500https://ask.sagemath.org/question/46367/symbolic-sumproduct-of-laurentpower-series/Comment by Road for <p>How can I do something like this?</p>
<pre><code>#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)
</code></pre>
<p>Thank you.</p>
https://ask.sagemath.org/question/46367/symbolic-sumproduct-of-laurentpower-series/?comment=46407#post-id-46407c[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.Mon, 29 Apr 2019 19:07:59 -0500https://ask.sagemath.org/question/46367/symbolic-sumproduct-of-laurentpower-series/?comment=46407#post-id-46407Comment by vdelecroix for <p>How can I do something like this?</p>
<pre><code>#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)
</code></pre>
<p>Thank you.</p>
https://ask.sagemath.org/question/46367/symbolic-sumproduct-of-laurentpower-series/?comment=46381#post-id-46381You 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.Sat, 27 Apr 2019 15:35:39 -0500https://ask.sagemath.org/question/46367/symbolic-sumproduct-of-laurentpower-series/?comment=46381#post-id-46381