I have show that $f(x)=2^x$ is continous by using the Weierstrass definition (epsilon-delta). I set apart two cases. The first one $x>x_0$ was good. The second one is the problem right now.
$|f(x)-f(x_0)|<\varepsilon$, $|x-x_0|<\delta$
For $x<x_0$:
$2^{x_0}-2^x=2^{x_0}(1-2^{-x_0+x})<2^{x_0}(1-2^{-\delta})=\varepsilon$
$\Rightarrow2^{-\delta}=-\frac{\varepsilon}{2^{x_0}}+1$
$\Rightarrow-\delta=\log_2(1-\frac{\varepsilon}{2^{x_0}})$
I could now continue and get an $\delta(x_0,\varepsilon)$, but to me this prove has to hold for all $\varepsilon>0$, so I can chose one that the log is not defined anymore. Am I doing something wrong here or where is my error in my thinking?
Thank you!
What you've done is fine! Note that in the beginning of the prof we fix $\varepsilon > 0$. So the method has to work for any $\varepsilon > 0$, but the individual delta may depend on $\varepsilon$. That's why we say $\delta = \delta(x_0, \varepsilon)$ - that is, $\delta$ may depend on $\varepsilon$ and $x_0$.