I am stuck with a exercie in Rudins book. For reference:
Proof that for any continuous (complex-valued) $f$ on $\mathbb{R}^n$ with compact support there is a sequence of functions $(\psi P_j)_{j=1, \dots ...}$ which converges uniformly to $f$. Hereby $P_j$ are polynomials and $\psi$ denotes a test function, i.e. a function from $C^{\infty}$ with compact support.
Any help/ideas would be greatly appreciated!
Let $\psi \in C_c^\infty(\mathbb{R}^n)$ be a smooth function with compact support that is equal to $1$ on $supp(f)$ and takes values in $[0,1]$. By construction, the set $K=supp(\psi)$ is compact, and so by the Stone-Weierstrass theorem polynomials are dense in C(K). Thus, there exists a sequence of polynomials $P_j$ converging uniformly to $f$ on $K$. Note that in fact $\psi P_j \to f$ uniformly on $K$. Indeed, $$\sup_{x\in K}|\psi P_j-f|\leq \sup_{x \in supp(f)}|\psi P_j-f|+\sup_{x \in K \setminus supp(f)}|\psi P_j-f|= \sup_{x \in supp(f)}|P_j-f|+\sup_{x \in K \setminus supp(f)}|\psi P_j|$$ But since by assumption $|\psi|\leq 1$, and $f=0 $ on $K\setminus supp(f)$, we observe that $$\sup_{x \in K \setminus supp(f)}|\psi P_j|\leq \sup_{x \in K \setminus supp(f)}|P_j-f| \to 0$$ and certainly also $\sup_{x \in supp(f)}|\psi P_j-f| \to 0$. Finally observe that $\psi P_j-f=0$ outside of $K$, so $$\sup_{x\in \mathbb{R}^n}|\psi P_j-f|=\sup_{x\in K}|\psi P_j-f| \to 0$$