= Solution
A <locally compact space>[locally compact] Hausdorff space is regular. Cover $K$ by finitely many open sets whose compact closures lie in $U$; their union $V$ satisfies $K\subset V\subset\overline V\subset U$, with $\overline V$ compact. The compact Hausdorff space $\overline V$ is normal, so the <Urysohn lemma> gives a <continuous function> $g:\overline V\to[0,1]$ equal to $1$ on $K$ and $0$ on $\overline V\setminus V$. Extend $g$ by zero outside $\overline V$. The boundary values make the extension continuous, and its support is a compact subset of $U$.
Back to article page