Actually the sup norm is not defined on C[0,\infty) since this space contains unbounded functions. If you consider the space C^b[0,\infty) of bounded continuous functions (or the space suggested yb Luiz) , then the sup norm is well defined, and this space is complete (basically since the uniform limit of continuous functions is continuous).
The space C[a,b] with the sup norm is Banach. However, I am not sure about the space C[0,infinty). There will be a challenge in defining the sup norm for C[0,infinity) as suggested by Dr. Werner.
As said in the previous answers, the sup norm is not well defined in that space. You may endow it with a locally convex topology by defining the sup norm over finite subsets of [0,\infty).
Sorry, Abdallah, this metric space is not complete (the constant functions, f_n(x)=n, form a Cauchy sequence without a limit); it is not compact ((f_n) doesn't have a covergent subsequence), and the e_n: x \mapsto e^{-nx}, are not dense (d(e_n,0)=\arctan(1)=\pi/4 for all n).
the function f_n(x)=n, for n>0, does not belong to the space C_0[0,\infty) which is the space of contiuous functions vanishing at infinity. For the density, 0 belongs to the dense subspace, because i considered the vector space generated by e_n:x-->exp(-nx) an of course 0 belongs to that "vector space". The idea of the proof the density of polynomial functions in C[0,1] and x--->t=exp(-x) is a contiuous bijection beetwen [0,\infty) and [0,1], one gets the result using the composition beetwen the above bijection and the polynomes t^n.
my apologies -- I overlooked the subscript 0. Therefore I have to modify my counterexample: Let f_n(x)=0 for x\ge 2, f_n(x)=n for x\le 1 and linear (meaning affine-linear) in between. This gives a Cauchy sequence in (C_0[0,\infty), d) that does not converge and that does not have a d-convergent subsequence.
I agree that the *linear span* of the e_n is dense!
Dear Dirk, you are right, it is not a complete space. my apologies too, i was thinking to [0,\infty] endowed with the metric d : d(x,y)=|acrtan(x)-arctan(y)|,
As said S.K. Vodopyanov, the completeness of $C(X)$ does not depend on the nature of $X$ provided that every continuous function on $X$ is bounded (i.e. $X$ is pseudo-compact) in order the uniform norm be actually a norm.
If $X$ fails to be pseudo-compact, one takes $C_b(X)$, the algebra of all bounded and continuous functions on $X$. This is always a complete Banach algebra. In case $X$ is locally compact, the algebra $C_0(X)$ of all continuous functions vanishing at infinity is also a Banach algebra for the uniform norm.
In case $X$ has no topology, one may consider the algebra $B(X)$ of all bounded ( hence not necessarily continuous) functions on $X$. This is also a complete Banach algebra for the uniform norm.
Now, if Prof G. Rajiv wantes to deal necessarily with $C[0, \infty[$, He can consider it with the generalized metric $d(f, g) = \sup\{|f(x) -g(x)|, x \in X\} $. The distance between two points may be infinite (see : J. B. Diaz, B. Margolis , A fixed point theorem of the alternative, for contraction on a generalized complete metric space, Bull. Amer. Math. Soc. Volume 74, Number 2 (1968), 305-309.) He then gets a complete generalized metric space.
As Dirk Werner has observed, the sup norm is not defined on C([0, infinity)). However, the following natural remark holds. Consider the vector space of all continuous functions f on [0, infinity), such that the limit lim f(x) when x converges to infinity does exist and is finite. Extend any such function to a continuous function on the compact space [0,infinity] (Alexandroff compactification.) by means of:: f(infinity):= lim f(x) when x converges to infinity. On the other hand, the subspace generated by the extensions to [0,infinity] of the functions exp(-nx), x in R, x>=0, n in N, forms a subalgebra of C([0,infinity]) which contains the identical unit function and separates the points of [0, infinity]. One applies Stone - Weierstrass theorem. The conclusion is that any continuous function on [0, infinity), with finite limit at infinity, can be uniformly approximated on the latter interval by elements from the subspace generated by the functions exp(-nx), n in N, x>=0. Moreover, any such function can be approximated uniformly on compact subsets of [0,infinity) by properly chosen polynomials (use the exponential power series). If "miu" is a positive M-determinate (moment determinate) Borel regular measure on [0, infinity) (with finite moments of all natural orders), then any non-negative continuous compactly supported function f, can be approximated from above by dominating polynomials, in the norm of the space L^1([0,infinity), "miu"}). In particular, such dominating polynomials can be chosen to be positive on [0, infinity), so that they have the form p(x)=q^2(x) + x r^2(x), x>=0, with q,r polynomials with real coefficients.
Please allow me to take you back to your counter-example of March 18, 2016: "Therefore I have to modify my counterexample: Let f_n(x)=0 for x\ge 2, f_n(x)=n for x\le 1 and linear (meaning affine-linear) in between".
This is no Cauchy sequence, since $d(f_n - f_{2n}) = n = \|f_n - f_{2n}\|$ for every $n > 0$.
Actually the problem does not lay in the "completeness (Cauchy implies convergence)", but in the definition of the norm in case of $C(\[0,+\infty[$ . As to the space $C_0([0, + \infty[$, it is a Banach space. This is a $C_0(X)$, with $X= [0, +\infty[$.