Simplification for a double summation where the upper limit of the inner index depends on the value of the outer index

summation

$$\sum_{x=1}^{N} \sum_{y=1}^{M(x)} (1 + a\cdot f\left(x\right))(1 + b \cdot f\left(y\right)) \tag{1}$$

where $N$, $a$, and $b$ are integer constants. $M$ is also an integer but changes for every value of x, which makes the index of the second summation dependent on the first. The problem is the relationship $M(x)$ is analytically difficult to define. Is there a way to simplify this expression?

Best Answer

I would evaluate this expression in the following way (in order):

  1. Select the $x$ value (starting with $x=1$)
  2. Then evaluate $M(x)$
  3. Now you have a sum of the form, where now we have $M\equiv M(x),f\equiv f(x)$:

$$\tag{1} \sum_{y=1}^{M} \left(1 + a\cdot f\right)(1 + b \cdot f\left(y\right)) $$

  1. Proceed to the next value of $x$ (in this case it's $x=2$)
  2. Go back to Step 2, 3, and 4, where the $M$ and $f$ can be slightly different (depending on the new value of $x$) from what you had before.

I'm certain that there's no way to "simplify" your expression without knowing the functional form of $M(x)$, for example is it $M(x)=\cos(x)$ or is it $M(x)=x^2 - \log(x) + \max(x,y,f(x),f(y),f(x)-f(y))$?

Related Question