Let
\begin{equation*}
\begin{array}{c}
f(x)=\sum_{i=0}^{\infty} i x^i=0 + 1 x+2 x^2+3x^3+ \cdots \quad \textrm{and}\\
g(x)=\sum_{i=0}^{\infty} 2^i x^i=1 +2 x+4 x^2+8x^3+ \cdots \\
\end{array}
\end{equation*}
be elements in \(\mathbb{Z}[[x]]\text{.}\) Let us compute \(f(x) + g(x)\) and \(f(x)\cdot g(x)\text{.}\) First the sum:
\begin{equation*}
\begin{split}
f(x) + g(x) & =\sum_{i=0}^{\infty } i x^i+\sum_{i=0}^{\infty } 2^i x^i\\
&=\sum_{i=0}^{\infty} \left(i+2^i\right) x^i\\
& =1+3x+6x^2+11x^3+ \cdots\\
\end{split}
\end{equation*}
The product is a bit more involved:
\begin{equation*}
\begin{split}
f(x) \cdot g(x) & =\left(\sum_{i=0}^{\infty } i x^i\right)\cdot \left(\sum_{i=0}^{\infty } 2^i x^i\right)\\
&=\left(0+ 1 x+2 x^2+3x^3+ \cdots \right)\cdot \left(1 +2 x+4 x^2+8x^3+ \cdots \right)\\
&=0\cdot 1 + (0\cdot 2 + 1\cdot 1)x + (0\cdot 4+1\cdot 2+2\cdot 1)x^2+ \cdots\\
&= x + 4 x^2+ 11 x^3 + \cdots\\
&= \sum_{i=0}^{\infty } d_i x^i\quad\quad\textrm{where } d_i= \sum_{j=0}^i j 2^{i-j}\\
\end{split}
\end{equation*}
We can compute any value of \(d_i\text{,}\) with the amount of time/work required increasing as \(i\) increases.
A closed-form expression for \(d_i\) would be desirable. Using techniques from Chapter 8, the formula is \(d_i=2^{i+1}-i-2\text{,}\) which we leave it to the reader to derive. Hence, \(f(x)\cdot g(x) =\sum_{i=0}^{\infty } (2^{i+1}-i-2) x^i\)