Proof
(related to Theorem: Continuous Functions Mapping Compact Domains to Real Numbers Take Maximum and Minimum Values on these Domains)
 Let $X$ be a metric spaces.
 Let $D\subset X$ be a compact subset.
 Let $f:D\mapsto \mathbb R$ be a continuous function mapping the domain $D$ to the real numbers $\mathbb R$.
 We have to show that there are points \(p,q\in X\), for which the function $f$ takes the maximum and the maximum values of the image $f(D)$, i.e. $f(p)=\max(f(D))$ and $f(q)=\min(f(D)).$
Thank you to the contributors under CC BYSA 4.0!
 Github:

References
Bibliography
 Forster Otto: "Analysis 2, Differentialrechnung im \(\mathbb R^n\), Gewöhnliche Differentialgleichungen", Vieweg Studium, 1984