= Solution
To prove boundedness on $[a,b]$, suppose instead that $f$ is unbounded and choose $x_n\in[a,b]$ with $|f(x_n)|>n$. The <Bolzano-Weierstrass theorem> gives a subsequence converging to $x_*\in[a,b]$. <Continuity> then gives $f(x_{n_j})\to f(x_*)$, contradicting $|f(x_{n_j})|>n_j$. Hence $f$ is bounded.
Let $M=\sup_{x\in[a,b]}f(x)$ and $m=\inf_{x\in[a,b]}f(x)$. Choose $d_n$ with $M-1/n<f(d_n)\leq M$. Another application of <Bolzano-Weierstrass theorem> yields a subsequence tending to $d\in[a,b]$, and <continuity> gives $f(d)=M$. Applying the same argument to $-f$ gives $c\in[a,b]$ with $f(c)=m$. Thus
$$
\boxed{f(c)\leq f(x)\leq f(d)\quad\text{for all }x\in[a,b].}
$$
This proves the <extreme value theorem> here, including both attainment assertions.
For $g$, its two limits supply $R>0$ such that $|g(x)|<1$ whenever $|x|>R$. On $[-R,R]$, <continuity> and the result just proved give a finite bound $K$. Consequently \b[$|g(x)|\leq\max\{K,1\}$ on the whole real line].
For the final value assertion, if $c=g(a)$, take $x=a$. Otherwise $0<c<g(a)$. The positive-infinity <limit> gives a point $b>a$ with $|g(b)|<c$, so $g(b)<c<g(a)$. The <intermediate value theorem> on $[a,b]$ now gives $x\in(a,b)$ with
$$
\boxed{g(x)=c.}
$$
Positivity of $c$ is essential to this tail argument; a function can tend to zero without ever attaining zero.
Back to article page