This is a question about mathematical signs.
Here is a summation:
$$ \sum_{i=k}^{l} x^2 $$
But there is possibility that $l<k$. What should I do? Like a new sign instead of this summation.
My solution: $$ \sum_{i=\min{k,l}}^{\max{k,l}} x^2 $$
Are there more elegant solutions? Any advice is appreciated.