[proofplan]
We first use properness to choose a point where $f$ is finite, and then use coercivity to trap a useful sublevel set inside a Euclidean ball. Lower semicontinuity makes this sublevel set closed, so finite-dimensional compactness makes it compact. We then prove that the infimum is finite, choose a minimizing sequence lying in the compact sublevel set, extract a convergent subsequence, and pass to the limit using lower semicontinuity.
[/proofplan]
[step:Construct a nonempty compact sublevel set containing all near minimizers]
Since $f$ is proper, its effective domain
\begin{align*}
\operatorname{dom} f := \{x \in \mathbb{R}^n : f(x) < +\infty\}
\end{align*}
is nonempty. Choose $x_0 \in \operatorname{dom} f$, and define the finite real number
\begin{align*}
c := f(x_0) + 1.
\end{align*}
By coercivity applied with the stricter threshold $a = c + 1$, there exists $R_{c+1} > 0$ such that $f(x) \geq c + 1$ whenever $|x| \geq R_{c+1}$. Define
\begin{align*}
R := \max\{R_{c+1}, |x_0|\}.
\end{align*}
Define the closed Euclidean ball centered at $0$ with radius $R$ by
\begin{align*}
\overline{B}(0,R) := \{x \in \mathbb{R}^n : |x| \leq R\}.
\end{align*}
Define the sublevel set
\begin{align*}
S := \{x \in \mathbb{R}^n : f(x) \leq c\}.
\end{align*}
Then $x_0 \in S$, so $S$ is nonempty. Also, if $x \in S$ and $|x| \geq R$, then $|x| \geq R_{c+1}$, hence $f(x) \geq c + 1$. This contradicts $f(x) \leq c$. Therefore every $x \in S$ satisfies $|x| < R$, and hence
\begin{align*}
S \subset \overline{B}(0,R).
\end{align*}
We next show that $S$ is closed. Let $(y_k)_{k \in \mathbb{N}}$ be a sequence in $S$ converging in $\mathbb{R}^n$ to a point $y \in \mathbb{R}^n$. Since $f$ is lower semicontinuous,
\begin{align*}
f(y) \leq \liminf_{k \to \infty} f(y_k).
\end{align*}
Because $y_k \in S$ for every $k \in \mathbb{N}$, we have $f(y_k) \leq c$ for every $k$, and hence
\begin{align*}
\liminf_{k \to \infty} f(y_k) \leq c.
\end{align*}
Thus $f(y) \leq c$, so $y \in S$. Therefore $S$ is closed.
[claim:The sublevel set $S$ is compact]
The set $S$ is compact.
[/claim]
[proof]
Let $(z_k)_{k \in \mathbb{N}}$ be a sequence in $S$. Since $S \subset \overline{B}(0,R)$, each coordinate sequence $(z_{k,i})_{k \in \mathbb{N}}$ is bounded in $\mathbb{R}$ for every $i \in \{1,\dots,n\}$. Use the fact that every bounded sequence in $\mathbb{R}$ has a convergent subsequence successively on the coordinates: first extract a subsequence along which the first coordinate converges, then extract from that subsequence one along which the second coordinate converges, and continue through the $n$-th coordinate. This gives a subsequence $(z_{k_j})_{j \in \mathbb{N}}$ and [real numbers](/page/Real%20Numbers) $z_{*,1},\dots,z_{*,n}$ such that $z_{k_j,i} \to z_{*,i}$ for every $i \in \{1,\dots,n\}$.
Define $z_* := (z_{*,1},\dots,z_{*,n}) \in \mathbb{R}^n$. Coordinatewise convergence in $\mathbb{R}^n$ is equivalent to Euclidean convergence, so $z_{k_j} \to z_*$. Since $S$ is closed and each $z_{k_j}$ lies in $S$, the limit $z_*$ lies in $S$. Thus every sequence in $S$ has a subsequence converging to a point of $S$. In metric spaces, compactness is equivalent to this [sequential compactness](/page/Sequential%20Compactness) property, so $S$ is compact.
[/proof]
[guided]
The purpose of this step is to build one compact set that contains all points where $f$ is close enough to being minimal. Properness gives us at least one finite value. Since $f$ is proper, the effective domain
\begin{align*}
\operatorname{dom} f := \{x \in \mathbb{R}^n : f(x) < +\infty\}
\end{align*}
is nonempty, so we may choose $x_0 \in \operatorname{dom} f$. Define
\begin{align*}
c := f(x_0) + 1.
\end{align*}
This is a real number because $f(x_0) < +\infty$ and the codomain of $f$ excludes the value $-\infty$.
Now apply coercivity with the stricter threshold $a = c + 1$. This gives a radius $R_{c+1} > 0$ such that every point sufficiently far from the origin has value at least $c+1$:
\begin{align*}
|x| \geq R_{c+1} \implies f(x) \geq c+1.
\end{align*}
Define
\begin{align*}
R := \max\{R_{c+1}, |x_0|\}.
\end{align*}
Define the closed Euclidean ball centered at $0$ with radius $R$ by
\begin{align*}
\overline{B}(0,R) := \{x \in \mathbb{R}^n : |x| \leq R\}.
\end{align*}
We then consider the sublevel set
\begin{align*}
S := \{x \in \mathbb{R}^n : f(x) \leq c\}.
\end{align*}
This set is nonempty because $f(x_0) \leq f(x_0)+1 = c$, so $x_0 \in S$.
Why is $S$ bounded? The threshold must be chosen strictly above $c$. If $x \in S$ and $|x| \geq R$, then $|x| \geq R_{c+1}$, so coercivity gives $f(x) \geq c+1$. But membership in $S$ gives $f(x) \leq c$, a contradiction. Hence every point of $S$ satisfies $|x| < R$, and therefore
\begin{align*}
S \subset \overline{B}(0,R).
\end{align*}
Why is $S$ closed? Let $(y_k)_{k \in \mathbb{N}}$ be a sequence in $S$ converging to some $y \in \mathbb{R}^n$. Lower semicontinuity gives
\begin{align*}
f(y) \leq \liminf_{k \to \infty} f(y_k).
\end{align*}
Since every $y_k$ lies in $S$, each value satisfies $f(y_k) \leq c$, so
\begin{align*}
\liminf_{k \to \infty} f(y_k) \leq c.
\end{align*}
Combining the two inequalities gives $f(y) \leq c$, hence $y \in S$. Therefore $S$ contains limits of convergent sequences from $S$, so $S$ is closed.
We have shown that $S$ is nonempty, closed, and bounded in $\mathbb{R}^n$. To prove compactness, take any sequence $(z_k)_{k \in \mathbb{N}}$ in $S$. Since $S \subset \overline{B}(0,R)$, each coordinate sequence $(z_{k,i})_{k \in \mathbb{N}}$ is bounded in $\mathbb{R}$. Every bounded sequence in $\mathbb{R}$ has a convergent subsequence, so we apply this one-dimensional subsequence property successively to the coordinates: first to the first coordinate, then to the second coordinate along the previously chosen subsequence, and so on through the $n$-th coordinate. This produces a subsequence $(z_{k_j})_{j \in \mathbb{N}}$ and a point $z_* = (z_{*,1},\dots,z_{*,n}) \in \mathbb{R}^n$ such that $z_{k_j,i} \to z_{*,i}$ for every coordinate $i$. Coordinatewise convergence is Euclidean convergence in $\mathbb{R}^n$, so $z_{k_j} \to z_*$. Since $S$ is closed, $z_* \in S$. Thus every sequence in $S$ has a subsequence converging to a point of $S$. In metric spaces, compactness is equivalent to this sequential compactness property, and therefore $S$ is compact.
[/guided]
[/step]
[step:Show that the global infimum is finite]
Define the infimum
\begin{align*}
m := \inf_{x \in \mathbb{R}^n} f(x).
\end{align*}
Since $x_0 \in \operatorname{dom} f$, we have
\begin{align*}
m \leq f(x_0) < +\infty.
\end{align*}
It remains to exclude $m = -\infty$. Suppose, for contradiction, that $m = -\infty$. Then for each $k \in \mathbb{N}$ there exists $y_k \in \mathbb{R}^n$ such that
\begin{align*}
f(y_k) \leq -k.
\end{align*}
Choose
\begin{align*}
k_0 := \max\{1, \lceil -c \rceil\}.
\end{align*}
Then $k \geq k_0$ implies $k \geq -c$, hence $-k \leq c$. Therefore $f(y_k) \leq -k \leq c$, so $y_k \in S$ for every $k \geq k_0$. Since $S$ is compact, the sequence $(y_k)_{k \geq k_0}$ has a subsequence $(y_{k_j})_{j \in \mathbb{N}}$ converging to some $y_* \in S$.
Lower semicontinuity of $f$ at $y_*$ gives
\begin{align*}
f(y_*) \leq \liminf_{j \to \infty} f(y_{k_j}).
\end{align*}
Because $f(y_{k_j}) \leq -k_j$ and $k_j \to \infty$, for every real number $M$ there exists $j_M \in \mathbb{N}$ such that $f(y_{k_j}) \leq M$ whenever $j \geq j_M$. Hence
\begin{align*}
\liminf_{j \to \infty} f(y_{k_j}) = -\infty.
\end{align*}
Thus $f(y_*) \leq -\infty$, which contradicts the fact that $f$ takes values in $(-\infty,+\infty]$. Therefore
\begin{align*}
-\infty < m \leq f(x_0) < +\infty.
\end{align*}
[guided]
We now prove that the number
\begin{align*}
m := \inf_{x \in \mathbb{R}^n} f(x)
\end{align*}
is a genuine real number. The upper bound is immediate from the point $x_0$ chosen earlier: since $x_0 \in \operatorname{dom} f$, we have $f(x_0) < +\infty$, and therefore
\begin{align*}
m \leq f(x_0) < +\infty.
\end{align*}
The only remaining danger is that the infimum might be $-\infty$. Suppose this happens. By the definition of infimum, for each $k \in \mathbb{N}$ there is a point $y_k \in \mathbb{R}^n$ with
\begin{align*}
f(y_k) \leq -k.
\end{align*}
Choose
\begin{align*}
k_0 := \max\{1, \lceil -c \rceil\}.
\end{align*}
If $k \geq k_0$, then $k \geq -c$, so $-k \leq c$. Hence
\begin{align*}
f(y_k) \leq -k \leq c,
\end{align*}
and therefore $y_k \in S$ for all $k \geq k_0$.
Now compactness of $S$ becomes useful. Since the tail sequence $(y_k)_{k \geq k_0}$ lies in $S$, compactness gives a subsequence $(y_{k_j})_{j \in \mathbb{N}}$ converging to some $y_* \in S$. Lower semicontinuity at $y_*$ gives
\begin{align*}
f(y_*) \leq \liminf_{j \to \infty} f(y_{k_j}).
\end{align*}
But $f(y_{k_j}) \leq -k_j$ and $k_j \to \infty$. Thus, for every real number $M$, there exists $j_M \in \mathbb{N}$ such that $f(y_{k_j}) \leq M$ whenever $j \geq j_M$. Therefore
\begin{align*}
\liminf_{j \to \infty} f(y_{k_j}) = -\infty.
\end{align*}
Thus $f(y_*) \leq -\infty$, which is impossible because $f$ takes values in $(-\infty,+\infty]$ and never takes the value $-\infty$. Therefore $m \neq -\infty$, and we have
\begin{align*}
-\infty < m \leq f(x_0) < +\infty.
\end{align*}
[/guided]
[/step]
[step:Extract a convergent minimizing subsequence from the compact sublevel set]
Since $m$ is finite and is the infimum of $f$ over $\mathbb{R}^n$, for each $k \in \mathbb{N}$ there exists $x_k \in \mathbb{R}^n$ such that
\begin{align*}
m \leq f(x_k) \leq m + \frac{1}{k}.
\end{align*}
Because $m \leq f(x_0)$, we have
\begin{align*}
m + \frac{1}{k} \leq f(x_0) + 1 = c
\end{align*}
for every $k \in \mathbb{N}$. Hence $x_k \in S$ for every $k \in \mathbb{N}$.
Since $S$ is compact, there exists a subsequence $(x_{k_j})_{j \in \mathbb{N}}$ and a point $x_* \in S$ such that
\begin{align*}
x_{k_j} \to x_*
\end{align*}
in $\mathbb{R}^n$ as $j \to \infty$.
[guided]
Because $m$ is finite, we can choose points whose values approach $m$ from above. More precisely, for each $k \in \mathbb{N}$, the definition of infimum gives a point $x_k \in \mathbb{R}^n$ such that
\begin{align*}
m \leq f(x_k) \leq m + \frac{1}{k}.
\end{align*}
The lower bound is automatic from the definition of $m$ as the greatest lower bound of all values of $f$.
We must check that these points stay in the compact set $S$. Since $m \leq f(x_0)$, for every $k \in \mathbb{N}$ we have
\begin{align*}
m + \frac{1}{k} \leq f(x_0) + 1 = c.
\end{align*}
Thus
\begin{align*}
f(x_k) \leq c,
\end{align*}
so $x_k \in S$ for every $k \in \mathbb{N}$.
Now compactness of $S$ gives the needed convergence. The sequence $(x_k)_{k \in \mathbb{N}}$ lies entirely in $S$, and $S$ is compact, so there is a subsequence $(x_{k_j})_{j \in \mathbb{N}}$ and a point $x_* \in S$ such that
\begin{align*}
x_{k_j} \to x_*
\end{align*}
in $\mathbb{R}^n$ as $j \to \infty$.
[/guided]
[/step]
[step:Pass to the limit using lower semicontinuity and identify the minimizer]
Lower semicontinuity of $f$ at $x_*$ gives
\begin{align*}
f(x_*) \leq \liminf_{j \to \infty} f(x_{k_j}).
\end{align*}
From the construction of the minimizing sequence,
\begin{align*}
m \leq f(x_{k_j}) \leq m + \frac{1}{k_j}.
\end{align*}
Since $k_j \to \infty$, the [squeeze theorem](/theorems/627) gives
\begin{align*}
\lim_{j \to \infty} f(x_{k_j}) = m.
\end{align*}
Therefore
\begin{align*}
f(x_*) \leq m.
\end{align*}
By definition of $m$ as the infimum of all values of $f$ on $\mathbb{R}^n$, we also have
\begin{align*}
m \leq f(x_*).
\end{align*}
Consequently
\begin{align*}
f(x_*) = m = \inf_{x \in \mathbb{R}^n} f(x).
\end{align*}
Thus $f$ attains its minimum on $\mathbb{R}^n$.
[guided]
The final step is to show that the compactness limit $x_*$ is not merely a cluster point of almost-minimizers, but an actual minimizer. Lower semicontinuity of $f$ at $x_*$ gives
\begin{align*}
f(x_*) \leq \liminf_{j \to \infty} f(x_{k_j}).
\end{align*}
From the construction of the minimizing sequence, every term satisfies
\begin{align*}
m \leq f(x_{k_j}) \leq m + \frac{1}{k_j}.
\end{align*}
Since $k_j \to \infty$, the upper and lower bounds both converge to $m$. By the squeeze theorem,
\begin{align*}
\lim_{j \to \infty} f(x_{k_j}) = m.
\end{align*}
Therefore lower semicontinuity gives
\begin{align*}
f(x_*) \leq m.
\end{align*}
On the other hand, $m$ is the infimum of $f$ over all of $\mathbb{R}^n$, so every value of $f$ is at least $m$, including the value at $x_*$. Hence
\begin{align*}
m \leq f(x_*).
\end{align*}
Combining the two inequalities yields
\begin{align*}
f(x_*) = m = \inf_{x \in \mathbb{R}^n} f(x).
\end{align*}
Thus $x_*$ is a point where $f$ attains its minimum on $\mathbb{R}^n$.
[/guided]
[/step]