0

Suppose we have some formula $f(x)$ and we are able to work out the sum of first $F(n)=\sum_{i=0}^nf(i)$ with some nice formula $F(n)$; Now suppose we want to work out tha following sum $G(n)=\sum_{i=0}^ni*f(i)$ Is there any way to work out / derive the $G(n)$ as some nice formula? Maybe the $G(n)$ would be based on formula $F(n)$?

Thank you

Nick
  • 1,231

2 Answers2

3

Maybe Abel's partial summation may help here.

  • For any real numbers $a_1, \ldots , a_n, b_1 \ldots , b_n$ you have $$\sum_{i=1}^n a_ib_i = A_nb_n + \sum_{i=1}^{n-1} A_i(b_i-b_{i+1})$$ where $A_i = a_1 + \cdots + a_i$.

Now set $a_i =f(i)$ and $b_i = i$ and note that for $i=0$ you have $if(i)=0$, so counting starts from $i=1$. Using your notation you have $A_i = F(i) = f(1) + \cdots + f(i)$ and hence

$$G(n)=\sum_{i=1}^ni\cdot f(i) = nF(n)-\sum_{i=1}^{n-1} F(i)$$

  • Would it be possible to push this result one step further in following way: suppose we know F(n) formula only for one particular n. Would it be possible express G(n) with this particular F(n)? (should i ask this as a separate question?) Hank you – blindProgrammer Feb 21 '20 at 07:43
  • I don't think so, because $f(i)$ can be anything and hence $F(i)$, as well. But I can imagine that for very specific $f(i)$, hence very specific $F(i)$, a further simplification might be possible, indeed. – trancelocation Feb 21 '20 at 07:59
  • I understand. Suppose we tweaked the function $f$ so that $f(i)$ changes, then all $F(i), F(i+1) ...$ and also $F(n)$ will change. Is not this indicating that there may exist relation between $F(i)$ and $F(n)$? – blindProgrammer Feb 21 '20 at 08:31
  • 1
    This seems not concrete enough. At this point I would suggest to experiment with concrete functions instead of "tweaking" imagined functions we do not know anything specific about. – trancelocation Feb 21 '20 at 08:35
1

You can write $$G(n)=(f(1)+f(2)+...+f(n))+(f(2)+f(3)+...+f(n))+(f(n-1)+f(n))+f(n)=\sum_{j=1}^n\sum_{i=j}^n f(i)=\sum_{j=1}^n (F(n)-F(j-1))=n\cdot F(n)-\sum_{j=0}^{n-1} F(j)$$