Intereting Posts

Subderivative of $ ||Au||_{L^{\infty}} $ to compute proximal operator
The $2^{nd}$, $4^{th}$ and $9^{th}$ terms of an AP
Logical errors in math deductions
Surprising identities / equations
Number of permutations which are products of exactly two disjoint cycles.
Measurable set of real numbers with arbitrarily small periods
Find an expression for the $n$-th derivative of $f(x)=e^{x^2}$
Show constructively that the sequence definition of continuity implies the epsilon-delta definition
For group $\mathbb{Z_{18}^*}$, how do I find all subgroups
Alice and Bob are flipping coins…
Is $gnu(2304)$ known?
Fourier transform of $\Gamma \left (\frac{1}{2}-i \frac{p}{2 \pi} \right) /\sqrt{ \cosh(p/2)}$
How to link two curves?
Please verify this definition of locally convex vector space
Evaluate the limit of $\sum\limits_{i=1}^n\frac{2}{n}\left$ when $n\to\infty$

Suppose $X$ is a non-compact metric space. Show that there exists a continuous function $f: X \rightarrow \mathbb{R}$ such that $f$ does not achieve a maximum.

I proved this assertion as follows:

If $X$ is non-compact, there exists a sequence which has no converging subsequence. Therefore, the set $E$ of elements of this sequence is infinite and has no limit points. Therefore, in the induced topology, $E$ is a countable discrete space. Let $e_n$ be a enumeration of $E$. Define $f: E \rightarrow \mathbb{R}$ as $f(e_n)=n$. Since $E$ is discrete, $f$ is continuous. By Tietze (note that $E$ is closed in $X$), there exists a continuous function $g: X \rightarrow \mathbb{R}$ which extends $f$. But $f$ is unbounded, then so is $g$, and $g$ does not achieve a maximum. $\square$

- Can compact sets completey determine a topology?
- Stone-Čech compactifications and limits of sequences
- totally bounded, complete $\implies$ compact
- Characterization of compactness in weak* topology
- Prob 12, Sec 26 in Munkres' TOPOLOGY, 2nd ed: How to show that the domain of a perfect map is compact if its range is compact?
- Rationals are not locally compact and compactness

My first question is: Is everything in the proof fine?

Now, my second question is: Can you provide me a proof which is more elementary? (Not using Tietze, for example. This exercise is just after the definition of compactness. I suppose this proof is not what was intended.)

And my third question is: Does the proposition hold for arbitrary topological spaces? If not, can you provide a counter-example?

- Is the Michael line star countable?
- Homology and topological propeties
- Is the sphere with points deleted a topological group?
- Continuous map on $S^2$
- Why $(\mathbb Q\times\mathbb Q)/(\mathbb Z\times{=})$ is not homeomorphic to $(\mathbb Q/\mathbb Z)\times(\mathbb Q/{=})$?
- How is PL knot theory related to smooth knot theory?
- Inverse image of a compact set is compact
- Tietze extension theorem for complex valued functions
- How to prove that, the set of all matrices $M_n{\mathbb R}$ with distinct eigen values is dense in $\mathbb R^n$?
- Complement of a totally disconnected compact subset of the plane

Your argument is correct and is probably the most straightforward. The result does not even hold in all $T_3$ spaces: in this answer I give a general method, due to Eric van Douwen, for starting with a $T_3$ space having two points that cannot be separated by a continuous real-valued function and producing from it a $T_3$ space on which all continuous real-valued functions are constant. The other answer to that question gives references to two $T_3$ spaces having two points that cannot be separated by a continuous real-valued function, and this answer expands on one of those spaces and gives yet another example of such a space.

The proof seems fine but Tietze needs to have the function continuous on a closed subset, but as it has no limit points this is given. If your function Needs to be continuous I can tell you the third question to have a negative answer.

In fact there is a non compact Hausdorff space such that the continuous functions are exactly the constant ones. Take $\mathbb{Z}^+$ with the relatively prime integer topology, here it is the case that for every non empty open sets $U,V$ the intersection $\overline{U}\cap \overline{V}\neq \varnothing$ hence every continuous function to $\mathbb{R}$ must be constant and so surely attains a Maximum.

To see it is not compact is a bit more difficult, here you use that if it is compact it needs to be $T_3$ and $T_4$ (as it is Hausdorff), but with $T_4$ we would have Urysohn-Lemma which grants you more continuous mappings.

Here is an explicit and elementary construction, using only the fact that a metric space is compact iff every sequence has an accumulation point. Let $(x_n)$ be a sequence in $X$ with no accumulation point, and define $g(x)=\inf_n d(x,x_n)+1/n$ and $f(x)=1/g(x)$. It is easy to see that $g(x)=0$ iff $x$ is an accumulation point of $(x_n)$, so $g$ is never $0$ and $f$ is defined on all of $X$. Moreover, $f(x_n)\geq n$, so $f$ is unbounded. Finally, it is straightforward to check that $g$ is continuous, and hence so is $f$.

- How many bit strings of length $8$ start with $00$ or end with $1?$
- $K(u,v)$ is a simple extension of fields if $u$ is separable
- A logarithmic integral $\int^1_0 \frac{\log\left(\frac{1+x}{1-x}\right)}{x\sqrt{1-x^2}}\,dx$
- Let $a_1,a_2,\cdots,a_n$ be n numbers such that $a_i$ is either 1 or -1.If $a_1a_2a_3a_4+\cdots+a_na_1a_2a_3=0$ then prove that 4|n.
- How to integrate this type of integral: $\lim_{n \rightarrow \infty}{\int_ 0^1}\frac{n x^{n-1}}{1+x}dx$
- Sum of Cauchy Sequences Cauchy?
- integrals proving equality
- Solve $x^3 \equiv 1 \pmod p$ for $x$
- Differential equation with a constant in it
- What's the dual of a binary operation?
- What are the formal names of operands and results for basic operations?
- Showing that $\frac{f(x)-f(x-h)}{h} \le f'(x) \le \frac{f(x+h)-f(x)}{h}$ given that f' is increasing
- Do odd imaginary numbers exist?
- Ramsey Number proof: $R(3,3,3,3)\leq 4(R(3,3,3)-1) + 2$
- Question on group homomorphisms involving the standard Z-basis