Let f(x)=-2x+1 if x<0 and f(x)=$x^2$+x if x>0. Give a sequence {$x_n$} in $\mathbb R$\ {0} such that {$x_n$} converges to zero but {f($x_n$)} diverges.
I've tried with the sequence {1/n} but it does not seem to work. I can't think of another sequence that would converge to zero. Can anyone help me out please?
Thanks.
$\endgroup$ 42 Answers
$\begingroup$How about $x_n=\frac{(-1)^n}{n}$ for a sequence that converges to zero but alternates in sign which would make the function values be different. Thus, the sequence here is: $-1,\frac{1}{2},-\frac{1}{3},\frac{1}{4},-\frac{1}{5},\cdots$
For odd $n$, the function values will converge to 1. The first few function values here would be $3,\frac{5}{3},\frac{7}{5}$ as the general term will be $\frac{n+2}{n}$ which could also be seen as $1+\frac{2}{n}$
For even $n$, the function values would be $\frac{1}{n^2}+\frac{1}{n}=\frac{n+1}{n^2}$ which would have function values of $\frac{3}{4},\frac{5}{16},\frac{7}{36},...\frac{11}{100}, .... \frac{101}{10,000},...\frac{1001}{1,000,000}$ which will likely converge to 0 from this side as the denominator is growing much faster than the numerator.
Putting these together, the function value sequence would look like this: $3,\frac{3}{4},\frac{5}{3},\frac{5}{16},\frac{7}{5},\frac{7}{36},\frac{9}{7},\frac{9}{64}..., \frac{2k+1}{2k-1},\frac{2k+1}{(2k)^2},\frac{2k+3}{2k+1},\frac{2k+3}{(2k+2)^2}...$ which doesn't converge since there are sub-sequences which converge to different values.
If you want, consider $\varepsilon=\frac{1}{10}$ and try to prove the function value sequence converge,i.e. there exists $L,N$ such that for all $n>N\implies|f(n)-L|<\varepsilon$.
If you believe they converge to 0, consider some big odd $n>N$ where the function value will be greater than 1 which doesn't work.
If you believe they converge to 1, consider some big even $n$ where the function value will be close to zero and more than .1 away from 1 as for $n=1000$ then the function value is $\frac{1001}{1,000,000}=.001001$. Any bigger even $n$ will have even smaller values to consider.
If you have an alternative proof of what is wrong with my above answers, show me the error.
$\endgroup$ 3 $\begingroup$The main point here is that $f$ is not continuous at $x=0$. It does have one-sided limits at $x=0$, but they are different. So, you need to find a sequence that converges to $0$ but visits both sides infinitely often. The answer by JB King uses the simplest possible such sequence.
$\endgroup$