find equation of a curve that represents the sum of f(x) Given a straight line with equation f(x)=2x where x belongs to {0,1,2,3,4,5}, 
how do i find g(x) (a curve?) which represents the sum over f(x)
In plain english if the price of an object doubles every time I purchase it, what will be the total cost if I purchased it 10 times?

Let $$g(x) = f(0) + f(1) + f(2) + ... + f(x) \\
= \sum_{n=0}^{x} f(n)$$
Since $f(x) = 2x$, 
$$\\ g(x) = \sum_{n=0}^{x} 2n = 2\sum_{n=0}^{x} n \\
=  2\sum_{n=1}^{x} n = 2(1+2+...+x)$$
There is a useful known result:
 $$1+2+...+N= \sum_{n=1}^{N} n = \frac{N(N+1)}{2}$$
So,
$$g(x) =  2\sum_{n=1}^{x} n = 2 \Big(\frac{x(x+1)}{2} \Big) = x(x+1)$$
Thus your cumulative sum function may be written as
$$g(x) = x^2+x$$
