Sum of $n+1$ power terms is infinite geometric series plus $O(r^{n+1})$

158 Views Asked by At

I want to show that for $|r|<1$, $$\sum\limits_{k=0}^n r^k =\frac{1}{1-r}+\mathcal{O}(r^{n+1})$$

But I'm not certain if my approach is actually correct. Here is how I show it:

$$\sum\limits_{k=0}^n r^k = \frac{1-r^{n+1}}{1-r}=\frac{1}{1-r}+\frac{r^{n+1}}{r-1}$$ Now, $$\left|\frac{r^{n+1}}{r-1}\right|\le\frac{1}{1-r}\text{sgn}(r^{n+1})r^{n+1}$$

My constant in this case is $\frac{1}{1-r}$, but my function is not exactly $r^{n+1}$, which, however, I don't think actually matters. Please let me know what you think.

2

There are 2 best solutions below

5
On BEST ANSWER

First, let us clarify what big-oh notation means: we'll say $f(x)=O(g(x))$ if $|f(x)|\leq C\cdot |g(x)|$ for some fixed $C>0$. To extend it to "equality" we have: $f(x)=g(x)+O(h(x))$ if $|f(x)-g(x)|\leq C\cdot |h(x)|$ for some fixed $C>0$.

Now, assuming $r$ is not fixed, what you're trying to prove is false unless you know $|r|\leq 1-\varepsilon$ for some given $\varepsilon>0$ (really, you only need $r\in[-1,1-\varepsilon]$ ). The reason is that, as you have already shown, you have $$\sum_{k=0}^n r^k=\frac{1}{1-r}+\frac{r^{n+1}}{r-1}.$$ That is, $$\left|\frac{1}{1-r}-\sum_{k=0}^n r^k\right|\leq\frac{r^{n+1}}{1-r}.$$ There is no way to eliminate the $1-r$ in the denominator, so for any fixed $C>0$, to show that the bound doesn't hold, all we need to do is take $r$ close enough to $1$ (this is why if we know $r\leq1-\varepsilon$, we can provide a constant that depends on $\varepsilon$). However, this does show that $$\sum_{k=0}^n r^k = \frac{1}{1-r}+O\left(\frac{r^{n+1}}{1-r}\right).$$

However, if $r$ is fixed, then $|1-r|$ is a constant, so the big-oh term above becomes $O(r^{n+1})$ because $|1-r|$ can be absorbed into the constant.

10
On

If you're trying to find $c\in \mathbb{R}_{>0}$ such that

$$\left| \frac{r^{n+1}}{r-1} \right| \le cr^{n+1}$$ for all $n \ge n_0$ for some $n_0$, then you can't for $r < 0$, as the LHS is always at least $0$, while the RHS is less than $0$ infinitely often due to the sign alternation.