1
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ what do you mean with "sum over $f(x)$"? $\endgroup$ – Arnaldo Mar 22 '17 at 14:02
  • $\begingroup$ I mean for example at x=10 the sum over f(x) should be f0) + f(1) + ... + f(10) @Arnaldo $\endgroup$ – m.awad Mar 22 '17 at 14:41
1
$\begingroup$

Your plain English question makes much more sense than your attempt to turn it into algebra.

You should be able to guess the pattern here:

number purchased        total price
       1                           P
       2                P + 2P =  3P
       3               3P + 4P =  7P
       4               7P + 8P = 15P
      ...

Hint. Think about nearby powers of $2$ in the last column.

$\endgroup$
1
$\begingroup$

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$$

$\endgroup$
  • $\begingroup$ This answers the OP's algebra question correctly, but it does not answer his real question, since he didn't turn that question into algebra correctly. $\endgroup$ – Ethan Bolker Mar 22 '17 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.