Need a refresher don't know where to start.

58 Views Asked by At

I'm currently reading a book on programming. An example gives me a (correct me if I'm wrong) series: $$ X + \frac{X}{2} + \frac{X}{4} + \frac{X}{8} + \dotsb + 1 $$ The answer given is roughly: $2X$

It's been a while since I've touched any type of calculus so I have no clue where to start.

1

There are 1 best solutions below

0
On

Hi Toboggan and welcome to MSE. As it has been said in the comments, what you wrote looks like a geometric series. I assume that what you are trying to compute is $$1+\sum_{i=0}^{\infty}\frac{X}{2^i}$$ for $X\neq 0$ (otherwise it is trivial).

The idea of how to compute it relies on the following facts:

  1. $\sum_{i=0}^{\infty}X/2^i=\lim_{t\to\infty}\sum_{i=0}^{t}X/2^i=X\cdot\left(\lim_{t\to\infty}\sum_{i=0}^{t}2^{-i}\right)$;
  2. Write $S_t$ for $\sum_{i=0}^{t}2^{-i}$, then $$\frac{1}{2^{t+1}}+S_t=S_{t+1}=1+\frac{1}{2}S_t$$ and so $$S_t = \frac{1-\frac{1}{2^{t+1}}}{1-\frac{1}{2}}.$$ Now you should be able to finish by your own.