For every continuous function $g$ does there exists a sequence of functions $\{f_n\}$ which converges to $g$?

224 Views Asked by At

Let, $C(\Bbb R):=\\ \{f:\Bbb R \to \Bbb R| \text{ $f$ is continuous and $\exists$ a compact set $K$ such that $f(x)=0$, $\forall x\in K^c$}\}.$ Let, $\displaystyle g(x)=e^{-x^2}$ for all $x\in \Bbb R$. Then prove that there exists a sequence $\{f_n\}$ in $C(\Bbb R)$ such that $f_n \to g$ uniformly.

Here $g$ is continuous, so by Weierstress approximation theorem we can say that there always exists a sequence of polynomials $\{p_n(x)\}$ in $K$ which converges uniformly to $g$ in $K$. But in that case how can I define $f_n(x)$ in such a way that $f_n \in C(\Bbb R)$ ?

2

There are 2 best solutions below

2
On BEST ANSWER

Since $g$ tends to $0$ as $x\rightarrow\infty$ you can just take $f_n = g\phi_n$ where $\phi_n$ is a smooth (for your questions continuous is sufficient) cutoff function such

$\phi_n(x)=1$ on $[-n,n]$, $\phi_n(x)=0$ on $(-\infty,-n-1]\cup[n+1,\infty)$, and $0\le \phi_n(x) \le 1$ elsewhere.

4
On

Let $f_n(x) = \begin{cases} g(x), & |x| \le n \\ g(n)(n+1-|x|), & n<|x| \le n+1 \\ 0, & \text{otherwise} \end{cases}$ (I am using the fact that $g$ is even, but it is clear how this would work for any $g$ that satisfies $g(x) \to 0$ as $|x| \to\infty$.

Then $\|g-f_n\|_\infty \le \sup_{|x| \ge n} g(x) = g(n)$, hence the convergence is uniform since $\lim_{n \to \infty} g(x) = 0$.