How would I interpret the following summation (where $r_{k}$ is a function that produces a scalar):
$f^{int}_i = \frac{(\kappa
\mathbf{b})_{i} + (\kappa \mathbf{b})_{i + 1}}{2} \displaystyle\sum_{k=i+1}^{N-2} [r_{k} - \frac{(\kappa
\mathbf{b})_{i - 1} + (\kappa \mathbf{b})_{i}}{2}\displaystyle\sum_{k=i}^{N-2}r_{k}]$
Is using k for both summations just out of laziness? Is this an equivalent function:
$f^{int}_i = \frac{(\kappa \mathbf{b})_{i} + (\kappa \mathbf{b})_{i + 1}}{2}\displaystyle\sum_{j=i+1}^{N-2} [r_{j} - \frac{(\kappa \mathbf{b})_{i-1} + (\kappa \mathbf{b})_{i}}{2}\displaystyle\sum_{k=i}^{N-2}r_{k}]$
where $r_{k} = (\boldsymbol{\omega_{i}}-\boldsymbol{\bar{\omega_{i}}})^TB_{i}R_{\pi/2}\boldsymbol{\omega_{i}}$
The original continuous form of the equation is as follows. This quantity is being calculated along a curve. There are two other terms for calculating $f_{int}^{i}$ but I am confident about their translation from the continuous case to the discrete case.
$f^{int}(s) = [(\int_{s}^{L} (\boldsymbol{\omega} - \boldsymbol{\bar{\omega}})^TB(s)R_{\pi/2}\boldsymbol{\omega}dt) (\kappa\mathbf{b})^T]'(s)$