# Examples and counter-examples in Real analysis - check my answers please

I've been given some practice examples, without solutions in preparation for an upcoming exam, and was hoping I could get them double checked here.

For each of the following, either give an example or say why such an example is impossible.

(a) A set A with exactly one limit point.

Ans: Take the set $A = \{\frac{1}{n} : n \in \mathbb{N}\}$ (the limit point is $0$)

(b) A compact set $K$ and a sequence $(a_n)$ in $K$ such that $(a_n)$ does not converge.

Ans: Take the sequence $(1,0,1,0,1,0,1,0,1,...)$

(c) A monotone sequence that does not converge.

Ans: $(1,2,3,4,5,...)$

(d) Two open sets $U, V$ contained in $[0, 1]$ such that $U ∩ V$ is not open.

Ans: Let $U = (0,0.5)$ and $V = (0.5,0.6)$

^question here, is a set which is not open, imply a closed set? I'm 99.5% sure the answer is no, and that we can also have a set neither open nor closed such as $(a,b]$ - can anyone confirm?

(e) A continuous function $f : [0, 2) → \mathbb{R}$ that has no maximum value.

Ans: $f(x) = \cfrac{1}{x-2}$

(f) A continuous function $g : [0, 1] → \mathbb{R}$ and a Cauchy sequence $(x_n)$ in $[0, 1]$ such that $(g(x_n))$ does not converge.

Ans: impossible, cauchy sequence is convergent by definition, and since $g$ is continuous on its domain, we cannot have a divergent $g(x_n)$.

(g) A function $u : \mathbb{R} → \mathbb{R}$ whose points of discontinuity form an infinite uncountable set.

Not sure.

(h) A function $v : \mathbb{R} → \mathbb{R}$ which is nowhere continuous but differentiable at one point.

Not sure

(i) A series $\sum a_n$ an that converges such that $\sum a_n^2$ diverges.

Will attempt again later, but if you could leave an answer so I could check, I would be grateful!

(j) A sequence of discontinuous functions on $[0, 1]$ converging uniformly to a continuous function.

Same as above.

• I like (i), (j) so I will give hints: $a_n = (-1)^n/\sqrt{n}$, $f_n(x) = 1$ if either $x$ is irrational or $x = r_m$ for some $m \leq n$ and $0$ otherwise where $r_1, r_2, \dots, r_n, \dots$ is a list of all rationals. – hot_queen Jun 18 '15 at 22:07
• As said by countless tutors, the statement "If X is not open then X is closed" is true if X is a door. In a sense. "most" subsets of $\Bbb R$ are neither open nor closed. There are topological spaces in which every subset is open or closed (or both) and they are actually called door spaces. A discrete space (in which every subset is open and closed) is a fairly obvious example. – DanielWainfleet Apr 10 '18 at 13:21
• For (h) if $f$ is differentiable at $x$ then $f$ must be continuous at $x.$ For (g) let $f(x)=0$ if $x$ is rational and $f(x)=1$ if $x$ is irrational. For (j) take my example $f$ for question (g) and for $n\in \Bbb N$ let $f_n(x)=f(x)/n.$ – DanielWainfleet Apr 10 '18 at 13:23
• Your questions are interesting, but in my opinion they should be put in different posts. Currently, your question is too broad: how could someone else having the same problem in one of your exercises find your OP? – Taroccoesbrocco Apr 10 '18 at 14:13

For $(d)$, that's not right - the empty set is open! (And no, there are sets which are neither open nor closed; it's not the best terminology. :P)

For $(e)$, you've designed a function with no minimum. But that's easily fixed.

For $(f)$, that's not quite correct: for example, the function $f(x)={1\over x}$ is a continuous function from $(0, 1)$ to $\mathbb{R}$ but the Cauchy sequence $\{{1\over n}: n\in\mathbb{N}\}$ doesn't get mapped to a Cauchy sequence by $f$. We need more: something special about $[0, 1]$ versus $(0, 1)$ . . .

For $(g)$, it might be easier to find an everywhere discontinuous function. (Hint: can you make it $0$ "some of the time," and $1$ "the rest of the time," in such a way that the $0$-valued points and the $1$-valued points "interlace" everywhere?)

For $(h)$, check the definition of differentiability . . .

I'll leave $(i)$ and $(j)$ off until you've had time to take a crack at them.

• For $d)$ I am not quite sure what you are trying to say. $e)$ But for the max here, doesn't it tend towards infinity? – elbarto Jun 18 '15 at 22:02
• @hot_queen my point was that the statement is false for $(0, 1)$, so somewhere we have to use some property of $[0, 1]$ which is not true of $(0, 1)$ . . . That's exactly the point of the second sentence of my answer for that part. – Noah Schweber Jun 18 '15 at 22:07
• @elbarto For $(d)$ the two sets you've given have intersection $\emptyset$, which is open. And for $(3)$, no: as $x$ gets close to 2 from below, $x-2$ is negative with very small absolute value, so ${1\over x-2}$ is negative with very large absolute value; the function is decreasing. (Easier to see: think about what ${1\over x}$ does as $x$ goes from $-1$ to $0$.) – Noah Schweber Jun 18 '15 at 22:09
• ahh, for $e)$ it's because of the domain right? Since we are restricted to approach from the left hand side.. What about $\sin(\frac{1}{x-2})$ ? For $d)$ I can't think of anything! :( – elbarto Jun 18 '15 at 22:16
• Re: $(e)$, yup! Both your responses work. Re: $(d)$, no that's still wrong - $U\cap V=(.4, .5)$, not $[.4, .5)$. Draw it and you'll see. – Noah Schweber Jun 20 '15 at 21:20

(i) $\displaystyle a_n = \frac{(-1)^n}{\sqrt{n}}$.

$\sum_n a_n$ converges but $\displaystyle \sum_n a_n^2 = \sum_n\frac{1}{n}$ does not.