= Solution
We can arrange that \b[neither the <supremum> nor the <infimum> is attained]. By part (d), choose a <continuous function> $f$ on $X$ with <unbounded> range, and put $u=|f|$. Choose $x_n\in X$ so that $t_n=u(x_n)$ increases strictly to infinity. Construct a <continuous function> $h:[0,\infty)\to\mathbb R$ with
$$
h(t_n)=(-1)^n n:
$$
keep it constant up to $t_1$ and interpolate linearly on each $[t_n,t_{n+1}]$. Since $t_n\to\infty$, the joining points have no finite accumulation, so this defines a <continuous function> everywhere on its domain.
Now set
$$
\boxed{g(x)=\frac{h(u(x))}{\sqrt{1+h(u(x))^2}}.}
$$
By <function composition>, $g$ is <continuous>, and $-1<g(x)<1$ for every $x$. Along the even and odd chosen points,
$$
g(x_{2n})\longrightarrow1,\qquad g(x_{2n+1})\longrightarrow-1.
$$
Thus $\sup_Xg=1$ and $\inf_Xg=-1$, and neither is a value of $g$. This proves the <bounded continuous witness with neither extremum attained> construction, including for <subsets> that are <bounded> but not <closed>.
Back to article page