Nested summation and product notation of two expressions Could someone please tell me how I should evaluate these two expressions together? I understand how each notation should be evaluated separately but not together. Also, would the way you evaluate change is the pi came before sigma?
$$\sum_{i=1}^n b_i^2 \prod_{j=1}^i a_j.$$
 A: It's easier to understand with well-placed parentheses viz.$$\sum_{i=1}^n\left(b_i^2 \prod_{j=1}^i a_j\right).$$In other words, we sum over $i$, but the value used for each $i$ in the sum is obtained as a product over $j$, times $b_i^2$. The end result is a sum of products. For example, if $a_j=j$ and $b_i=i$ this sum is $\sum_{i=1}^n(i^2\cdot i!)$.
The innermost operation is performed first, and can use the outermost operation's dummy variable, i.e. $i$ can appear inside because it appears outside, but the inner operation's dummy variable $j$ can't appear outside. An example with the product outside. You've asked if $\prod$ could come first. This would give a product of sums, which is different (although it does expand to a sum of products). An example would be$$\prod_{i=1}^n\sum_{j=m(i)}^{M(i)}f(i,\,j).$$In this case, we multiply together one factor per $i$, but each such factor is a sum, over values of $j$ from a minimum $m(i)$ to a maximum $M(i)$ inclusive, of $f(i,\,j)$.
A: For each $i\in\{1,\ldots,n\}$ you evaluate $b_i^2\prod_{j=1}^ia_j$, and you then compute the sum of these $n$ products. E.g., if $n=3$ you have
$$b_1^2a_1+b_2^2a_1a_2+b_3^2a_1a_2a_3\,.$$
You cannot reverse the order of the sum and product without changing the limits, because the expression
$$\prod_{j=1}^ia_j\sum_{i=1}^nb_i^2$$
makes no sense: the $i$ that is the upper limit of the product must be a constant, while the index $i$ in the summation is a variable that ranges from $1$ through $n$. You can, however, have
$$\prod_{i=1}^na_i\sum_{j=1}^ib_j^2\,;$$
with $n=3$ this is
$$a_1b_2^2+a_2(b_1^2+b_2^2)+a_3(b_1^2+b_2^2+b_3^2)\,.$$
I would normally add parentheses:
$$\sum_{i=1}^n\left(a_i\prod_{j=1}^ib_j^2\right)$$
and
$$\prod_{i=1}^n\left(a_i\sum_{j=1}^ib_j^2\right)$$
in both cases. They make the expressions easier to read, but they are not absolutely necessary, since their existence can be inferred from the fact that the upper limit of the inner expression depends on the index in the outer expression.
