Proving uniform approximation by polynomials when sets are not compact

Here are two problems of the same flavor (and hence I posted them simultaneously) based on the Stone-Weierstrass Approximation Theorem.

1. 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})$.
2. 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)

• why don't you just define $g(0):=a$? Due to the limit assumption $g$ becomes continuous on the compact interval $[0,1]$, and then use Weierstrass Appoximation Theorem directly... – sranthrop Apr 28 '15 at 3:22
• Oh I can do that? o.o – Landon Carter Apr 28 '15 at 3:23
• yeah, why not? :) – sranthrop Apr 28 '15 at 3:24
• Ok, got it. So for the second problem, consider $y=e^{-x}$ and then the alternative statement becomes: "Find a polynomial $P(y)$ approximating $g(y)=f(-\log(y))$ on $(0,1]$ with $\lim_{y\to0}g(y)=a$". Because $g$ is continuous on $(0,1]$, we define $g(0)=a$ and thus we can use the Weierstrass Approximation Theorem on $[0,1]$. – Landon Carter Apr 28 '15 at 3:28
• Be careful: If you define $g$ by $g(y)=f(-\log(y))$ for $y\in(0,1]$ and $g(0):=a$, then $g$ becomes continuous by the limit assumption on $f$. – sranthrop Apr 28 '15 at 3:40

(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$.
• Even if you meant "Then show that..." would the following argument be correct? "We have got $p_n$ uniformly converging to $g$ on $[0,1]$. Now we consider the result that if $t$ is continuous and $h$ is a bijection, then we can get a sequence of polynomials $q_n$ converging uniformly to $t\circ h^{-1}$ and therefore $p_n\circ h$ uniformly converges to $t\circ h^{-1}\circ h=t$. Here $h=\dfrac{1}{x}$ with $x\in[1,\infty)$, so $h$ is a bijection, and $t=f$." – Landon Carter Apr 28 '15 at 4:12