Here are two problems of the same flavor (and hence I posted them simultaneously) based on the Stone-Weierstrass Approximation Theorem.
- Let $f$ be continuous on $[1,\infty)$ with $\lim_{x\to\infty}f(x)=a$. Show that $f$ can be uniformly approximated by a polynomial $P(\dfrac{1}{x})$.
- Let $f$ be continuous on $[0,\infty)$ with $\lim_{x\to\infty}=a$. Then show that $f$ can be uniformly approximated on $[0,\infty)$ by a polynomial $P(e^{-x})$.
So let me explain what I tried to do in the first problem because the second one has similar nature.
Let $y=\dfrac{1}{x}$ and thus as $x\in[1,\infty)$ we have $y\in(0,1]$. So are looking at approximating $g(y)=f(\dfrac{1}{y})$ by a polynomial $P(y)$. We first note that both $g$ and $P$ are bounded on $(0,1]$ because $\lim_{y\to0}g(y)=a$.
Consider the interval $[\dfrac{1}{N},1]$. Given $\varepsilon>0$ we can find polynomial $P(y)$ such that $|P(y)-g(y)|<\varepsilon\forall x\in[\dfrac{1}{N},1]$.
Now we know that $\lim_{y\to0}g(y)=a$ hence given this same $\varepsilon$ we can find $\delta>0$ such that whenever $y<\delta$ we have $|g(y)-a|<\varepsilon$.
Thus we slightly make a modification to $N$ and select our $N$ such that $\dfrac{1}{N}<\delta$.
If $P$ has to approximate $g$ throughout, then we must also have $|P(y)-a|\leq|P(y)-g(y)|+|g(y)-a|<2\varepsilon$ for all $y\in(0,\dfrac{1}{N}]$. So $P(y)$ must approximate the constant function $a$ on this small interval.
I am having some difficulty in showing that this $P$ exists, which approximates $g$ on $(0,1]$ and also the constant function $a$ on $(0,\dfrac{1}{N}]$. Any help will be appreciated.
Source:Apostol (Mathematical Analysis)
(1) Just define $g:[0,1]\to\mathbb R$ by $g(y):=f(1/y)$ for $y\in(0,1]$ and $g(0):=a$. Due to the limit assumption on $f$, $g$ becomes continuous on the compact interval $[0,1]$. Weierstrass' Theorem now gives you a sequence of polynomials $p_n(y)$ converging to $g(y)$ uniformly on $[0,1]$. Then show that $p_n(1/x)$ converges uniformly to $f(x)$ on $[1,\infty)$.
(2) The idea is basically the same. Define $g:[0,1]\to\mathbb R$ by $g(y):=f(-\log(y))$ for $y\in(0,1]$ and $g(0):=a$.