Exercises from Real Analysis with worked solutions.

Exercise 46. Question 5.4.A
§5.4HW 7
If A is a noncompact subset of Rn, show that there is abounded continuous real-valued function on A that does notattain its maximum.\text{If $A$ is a noncompact subset of $\mathbb{R}^n$, show that there is a} \\ \text{bounded continuous real-valued function on $A$ that does not} \\ \text{attain its maximum.}
Exercise 47. Question 5.4.B
§5.4HW 7
Find a discontinuous function on [0,1] that is bounded but doesnot achieve its supremum.\text{Find a \textit{discontinuous} function on $[0, 1]$ that is bounded but does} \\ \text{not achieve its supremum.}
Exercise 48. Question 5.4.E
§5.4HW 7
Show that a function f mapping a compact set S⊂Rn into Rmis continuous if and only if its graphG(f)={(x,f(x)):x∈S}is compact.\text{Show that a function $f$ mapping a \textit{compact} set $S \subset \mathbb{R}^n$ into $\mathbb{R}^m$} \\ \text{is continuous if and only if its graph} \\ G(f) = \{ (\mathbf{x}, f(\mathbf{x})) : \mathbf{x} \in S \} \\ \text{is compact.}
Exercise 49. Question 5.4.G
§5.4HW 7
Suppose that f is a positive continuous function on Rn such thatlim⁡∥x∥→∞f(x)=0[i.e., for all ε>0, there is an N so that ∣f(x)∣<ε for allx with ∥x∥>N]. Show that f attains its maximum.\text{Suppose that $f$ is a \textit{positive} continuous function on $\mathbb{R}^n$ such that} \\ \lim_{\lVert \mathbf{x} \rVert \to \infty} f(\mathbf{x}) = 0 \\ \text{[i.e., for all $\varepsilon > 0$, there is an $N$ so that $|f(\mathbf{x})| < \varepsilon$ for all} \\ \text{$\mathbf{x}$ with $\lVert \mathbf{x} \rVert > N$]. Show that $f$ attains its maximum.}
Exercise 50. Question 5.4.H
§5.4HW 7
Let f be a periodic function on R, meaning that there is d>0with f(x+d)=f(x) for all x∈R. (We call d the period of fif it is the least positive number with this property and saythat f is d-periodic.) Show that if f is continuous, then fattains its maximum and minimum on R.\text{Let $f$ be a periodic function on $\mathbb{R}$, meaning that there is $d > 0$} \\ \text{with $f(x + d) = f(x)$ for all $x \in \mathbb{R}$. (We call $d$ the period of $f$} \\ \text{if it is the least positive number with this property and say} \\ \text{that $f$ is d-periodic.) Show that if $f$ is continuous, then $f$} \\ \text{attains its maximum and minimum on $\mathbb{R}$.}
Brown dog curled up asleep on a blanket