Suppose I define y = Sum[Subscript[a, k] x^k, {k, 0, Infinity}]
which is a power series representation for y
. Now if I multiply y
by bx^n+cx^m
I want the resulting answer to be sum of two power series: Sum[b Subscript[a, k] x^(k+n), {k, 0, Infinity}] + Sum[c Subscript[a, k] x^(k+m), {k, 0, Infinity}]
. However simply writing (bx^n+cx^m)y
does not achieve this. How can I solve this problem?
$\begingroup$
$\endgroup$
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
You can work with ReplaceAll rules
y = Sum[a[k] x^k, {k, 0, Infinity}]
y1 = y /. y[[1]] -> (y[[1]]*(b x^n + c x^m) // Expand)
y2 = y1 /. Sum[r_ + s_, t_] :> Sum@Sequence[r, t] + Sum@Sequence[s, t]