Prove that the set
$Y=\{0\} \cup\left\{\frac{\cos k}{k^{3}} \mid k \in \mathbb{N}\right\}$ is a compact subset of $R$.
From the definition of compactness, it is sufficient to show the closedness and boundedness of the given set $Y$. Using the fact that the $cos$ function is bounded above for any $k \in \mathbb{N}$, we can easily deduce the boundedness of $Y$ (and if not mistaken, using the squeeze theorem implies the limit of $\frac{cos k}{k^{3}}$ is zero). However, in order to show the closedness, it will be enough to prove all boundary points of $Y$ are in the set itself - intuitively, there seems to be only one boundary point - $\{0\}$, but I can not prove mathematically why this is the case.
Let us prove a general fact: Let $(x_n)$ be sequence in a $\mathbb R$ which converges to a point $a=x$. Then $A=\{x\} \cup \{x_1,x_2,...\}$ is compact.
Proof: Let $(U_n)$ be an open cover of $A$. Then $x \in U_k$ for some $k$. Since $x_n \to x$ we have $x_n \in U_k$ for all $n$ sufficiently large, say for all $n \geq m$. Pick $k_1,k_2,...,k_{m-1}$ such that $x_i \in U_{k_i}$ for $ 1 \leq i <m$. Then $U_k$ together with $U_{k_i}: 1 \leq i <m$ gives a finite subcover.
Alternatively, you can show that the only limit point of $A$ is $x$, so $A$ contains all its limit points, making $A$ closed and bounded.