What careless mistake did this step take? Suppose $f = \frac{(1/2)^n}{1+(1/2)^n}$ where $n \geq 1 $ I wanted to give an upper bound the function.
So I did
$f = \frac{(1/2)^n}{1+(1/2)^n} \leq \frac{(1/2)^n}{(1/2)^n} = 1$
Which is right, but then I also did
$f = \frac{(1/2)^n}{1+(1/2)^n} \leq \frac{(1/2)^n}{(1)} = (1/2)^n$ and as $n\to \infty$, the function is bounded by $0$ and this makes no sense at all. I have no idea what I am doing wrong in my algebra, but the solution makes no sense ot me, I couldn't interpret the answer at all
 A: Why doesn't it make sense? What you have written is correct. In fact,
$$0 \leq \dfrac{a^n}{1+a^n} \leq a^n$$ is true for all $a \geq 0$. Hence, if $a < 1$, we have that $$\lim_{n \to \infty} \dfrac{a^n}{1+a^n} = 0$$
EDIT
For $a < 0$, we will split it into three cases.
For $a \in (-1,0)$, we have $$\lim_{n \to \infty} \dfrac{a^n}{1+a^n} = \dfrac{\lim_{n \to \infty} a^n}{1+ \lim_{n \to \infty} a^n} = 0$$
For $a \in (-\infty,-1)$, we have $$\dfrac{a^n}{1+a^n} = \dfrac1{1+\left(\dfrac1a \right)^n}$$
Hence, $$\lim_{n \to \infty} \dfrac{a^n}{1+a^n} = \lim_{n \to \infty} \dfrac1{1+\left(\dfrac1a \right)^n} = \dfrac1{1+\lim_{n \to \infty} \left(\dfrac1a \right)^n} = 1$$
For $a=-1$, for even $n$, we have $$\dfrac{(-1)^{2k}}{1+(-1)^{2k}} = \dfrac12$$
For $a=-1$, for odd $n$, it blows up.
For $a=-1+\epsilon$, for odd $n$, we have $$\lim_{\epsilon \to 0^+} \dfrac{(-1+ \epsilon)^{2k+1}}{1+(-1+ \epsilon)^{2k+1}} = -\infty$$
For $a=-1-\epsilon$, for odd $n$, we have $$\lim_{\epsilon \to 0^+} \dfrac{(-1- \epsilon)^{2k+1}}{1+(-1- \epsilon)^{2k+1}} = +\infty$$
A: But you are correct! You made no mistake.  Consider: when $n$ is large, $(1/2)^n$ is very close to 0, and $1+(1/2)^n$ is close to 1.  Then their quotient is close to 0.
For example, take $n=20$.  Then you have $$f(n) = \frac{0.00000095367431640625}{1.00000095367431640625} = 0.00000095367340691241.$$
