# Summation Notation for Current Index

I have a question on how to properly present a summation with the use of variables. I am not so familiar with how to properly use summation notation, and am looking for some advice on how to do so properly.

Right now, I have built the following summation:$$t_\text{pal}=\sum_{i=1}^{N_R}\left(n_it_i-\sum_{j=\text{current index}}^{N_R}n_jt_j\right)$$

Within the outer summation, I have an inner summation that I want to start at the index of the current term (represented as j = current index) . How should this be represented in the inner summation, would it just be j = i?

Also, I want to also have a condition where if the value of the term is less than 0, the term takes the value of 0 (if term < 0, term = 0). How should this be properly represented in the summation?

Thank you.

• So you're really asking two questions. (i) What should "current index" be? If you make it $i$,$$t_\text{pal}=-\sum_{i=1}^{N_R}\sum_{j=i+1}^{N_R}n_jt_j,$$so I wonder if the rest of your expression says what you intended, but of course there's nothing wrong with this double sum. (ii) How do you replace a term, say $x$, with $0$ if $x<0$? You can write $x^+$, or $(x)^+$ if $x$ is an expression comprising muiltiple symbols.
– J.G.
Jul 7 at 14:15
• @J.G. Hi J.G., thank you for the advice. I have one question about part (i) of the answer. If I were to expand out the inner summation, how would it be represented? Jul 7 at 16:38
• I think you're asking (with the abbreviation $u_i=n_it_i$) why $u_i-\sum_{j=i}^{N_R}u_j=-\sum_{j=i+1}^{N_R}u_j$, or (multiplying by $-1$, which might make it clearer) $\sum_{j=i}^{N_R}u_j-u_i=\sum_{j=i+1}^{N_R}u_j$. The left-hand side is$$\color{red}{u_i+}\color{blue}{u_{i+1}+\cdots+u_{N_R}}\color{red}{-u_i}=\color{blue}{u_{i+1}+\cdots+u_{N_R}},$$matching the right-hand side.
– J.G.
Jul 7 at 16:57
• @J.G. Hi J.G., gotcha. I think I understand now, so lets say if $N_R = 3$, then the equation, $$t_{pal} = -\Sigma^{N_R}_{i = 1}\Sigma^{N_R}_{j = i + 1}n_jt_j$$ can be expressed as $$t_{pal} = -n_3t_3 - n_2t_2 ?$$ Jul 7 at 19:44

Here is a derivation with some intermediate steps. We obtain

\begin{align*} \color{blue}{t_{\text{pal}}}&=\sum_{i=1}^{N_R}\left(n_it_i-\sum_{j=i}^{N_R}n_jt_j\right)\tag{1}\\ &=\sum_{i=1}^{N_R}\left(n_it_i-\left(n_it_i+\sum_{j={i+1}}^{N_R}n_jt_j\right)\right)\tag{2}\\ &=\sum_{i=1}^{N_R}\left(-\sum_{j={i+1}}^{N_R}n_jt_j\right)\tag{3}\\ &\,\,\color{blue}{=-\sum_{i=1}^{N_R}\sum_{j={i+1}}^{N_R}n_jt_j}\tag{4}\\ \end{align*}

Comment:

• In (1) we start with $$j=i$$ in the inner sum.

• In (2) we separate the first summand from the inner sum.

• In (3) we cancel the terms $$n_it_i$$.

• In (4) we factor out $$-1$$.

Note, we can the sum (4) also write as \begin{align*} -\sum_{i=1}^{N_R}\sum_{j={i+1}}^{N_R}n_jt_j=\sum_{i=1}^{N_R}\sum_{j={i+1}}^{N_R}\left(-n_jt_j\right) \end{align*} If depending on $$n_j$$ and $$t_j$$ the innermost terms $$(-n_jt_j)$$ is positive or should be set to $$0$$ otherwise we can write for instance \begin{align*} \color{blue}{\sum_{i=1}^{N_R}\sum_{j={i+1}}^{N_R}\max\{-n_jt_j,0\}}\qquad\text{or}\qquad\color{blue}{\sum_{i=1}^{N_R}\sum_{j={i+1}}^{N_R}\left(-n_jt_j\right)^{+}} \end{align*} as already indicated in the comment section.

• Thank you for the answer! It definitely cleared up the confusion I had. Jul 7 at 19:57
• @Justin: You're welcome! Good to see the answer is helpful. :-) Jul 7 at 19:58