# 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

-
You showed $\lim_{n\to\infty}f=0$, which makes perfect sense. You found a lower bound for all $n$ while the first step you found an upper bound for all $n$. – Clayton Jan 4 '13 at 3:29
Write it as $f(n)\le (1/2)^n$. What you've shown is that the limit of $f$ as $n$ tends to $\infty$ is $0$. Of course, this doesn't mean that $f$ is always less than or equal to $0$. – David Mitra Jan 4 '13 at 3:29
So it is always bounded by 1 for all n. And then as n gets larger you can get another smaller and smaller bound which is going to zero. Being bounded by 1/128 and by 1 simultaneously is no contradiction. – Fixed Point Jan 4 '13 at 3:30
What happens if i replace (1/2) by (-1/2)? What is behavior and bound then? – Hawk Jan 4 '13 at 3:32
@Clayton He did not find a lower bound for all n. – Calvin Lin Jan 4 '13 at 3:33

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$$

-
Oh I didn't look at the lower bound. Initally I thought I have a sum of positive numbers less than 0. What is the behaviour if $a < 0$? – Hawk Jan 4 '13 at 3:28
@sizz Have updated the behavior for $a < 0$. – user17762 Jan 4 '13 at 3:40
What was the problem of just going straight into $n = 2k+1$? What's the small epsilon for? – Hawk Jan 4 '13 at 3:55
@sizz for $n=2k+1$, the expression $\dfrac{a^{2k+1}}{1+a^{2k+1}}$ blows up. What I wanted to convey ws that if you approach from the right of $1$ for an odd $n$, it blows to $-\infty$ while approach from left, it blows to $+\infty$. – user17762 Jan 4 '13 at 3:59
Sorry I just want to ask for the case when $a \in (-1, 0)$ Why does $a^n \to 0$ again? Does it have to do with the geometric series' convergence of $|a| < 1$?? – Hawk Jan 4 '13 at 22:29

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.$$

-