Mathematical equation/notation

46 Views Asked by At

How do I represent the following sum of products using summation notation?

$$P = p_1 q_1 + p_2 (q_1+q_2) + p_3(q_1+q_2+q_3) + \dots $$

Here is my attempt: $P$ = $\sum_{i=1}^{n}{\{p_i\sum_{i=1}^{i}{q_i}\}}$

where $i = 1,2,...n$

Thanks

Note: what I am trying to capture in my equation is the sum of the product of a function 1 (p) with the cumulative sum of function 2(q) such that they both have the same number of elements

1

There are 1 best solutions below

5
On BEST ANSWER

I would write it $$\sum_{i=1}^n\left(p_i\sum_{k=1}^i q_k\right)$$

which is the same as

$$\sum_{i=1}^n\left(\sum_{k=1}^i p_iq_k\right)$$

Or again (after inverting the two sum symbols)

$$\sum_{k=1}^n\left(\sum_{i=k}^n p_iq_k\right)$$

Note that you can not use the same summation index for two separate sums, it makes no sense. I chose the letter $k$ for the second sum, but you can use just any letter you would like (except $i$, $n$, and also $p$, $q$).