Big-$O$ for $\frac{1}{1-x}$ I would like to show as $x\rightarrow 0$
$$\frac{1}{1-x}= 1+x^2+x^3+\dots+x^n +O(x^{n+1})$$
My inclination is to multiply by $1-x$ to get:
$1=(1-x)(1+x^2+\dots+x^n) +(1-x)O(x^{n+1})$
and then, for some constant $C$:
$1=x^{n+1}-1 +(1-x)C|x^n|$
But I am stuck here. I am a self-studier, but I tried to tag this as "homework" as it is that type of problem. Thanks.
 A: You have
$$1+x+\cdots+x^n=\frac{1-x^{n+1}}{1-x}=\frac{1}{1-x}-\frac{x^{n+1}}{1-x}$$
Now, for $|x|<\frac12$,
$$\left|\frac{x^{n+1}}{1-x}\right|<2|x|^{n+1}$$
Hence
$$\frac{1}{1-x}=1+x+\cdots+x^n+O(x^{n+1})$$
You can prove the same on any interval $]-\varepsilon,\varepsilon[$ with $0<\varepsilon<1$, you will just get a factor $\frac{1}{1-\varepsilon}$ instead of $2$. You can't write the same inequality on $[-1,1]$ since the series is not convergent at $x=1$ or $x=-1$.

Just a side note: since $x^n=O(x^n)$, you could as well write $1+x+\cdots+x^{n-1}+O(x^n)$ in your question.
A: One way to do this is to observe that the Taylor series for $\frac{1}{1-x}$ is:
$$\frac{1}{1-x} = \sum_{i = 0}^\infty x^i $$
Which converges for $\left \lvert x \right \rvert < 1$. So for any $n$ we can write:
$$\frac{1}{1-x} = 1 + x^2 + x^3 + \cdots + x^n + \sum_{i = n + 1}^\infty x^i $$
Now you simply need to prove that $\sum_{i = n + 1}^\infty x^i$ is $O(x^n)$ as $x \to 0$. I will show you a proof of that if you'd like, but since you are doing self-study it might be a good idea to do it yourself if you can.
