Bounded functions on a compact interval If i have given
$f:[0,1] \rightarrow \mathbb{R}$ 
$f$ is bounded.
$g:[0,1] \rightarrow \mathbb{R}, x \rightarrow xf(x)$ 
And i have to prove $g$ continous in x=0.
What can i say about $f$, is it continous as well? I think no. We can say every continous function on a compact intervall is bounded, but not vice versa. What we can say is that does not reach infinity somewhere, and that it has a minimum and maximum. But then $f$ could just jump around like it wants, thus $g(x) $ will be noncontinous as well, right?
I would just proove the continuity like this:
$\lim_{x\rightarrow 0}xf(x)=g(0) = 0*f(0) =0.$
But that is way too simple, i think i am missing something.
 A: Use the definition to prove that $g$ is continuous at $x=0.$ Since $f$ is bounded there exists $M$ such that $|f(x)|\le M,\forall x\in [0,1].$ So,
$$\forall \epsilon>0 \exists \delta>0 : 0\le x< \delta=\frac{\epsilon}{M} \implies |g(x)-g(0)|=|xf(x)|\le M|x|\le M\delta=\epsilon.$$
This shows that $g$ is continuous at $x=0.$
Note that this only works at $x=0.$ The reason is that $x\to 0$ and $f(x)$ is bounded. We can't apply the same argument at any other $x.$ Take $$f(t)=\left\{\begin{array}{c}-1 \quad \mathrm{if} \quad 0\le t \le x \\1 \quad \mathrm{if} \quad x< t \le 1 \end{array}\right.$$ Then, $\lim_{t\to x^-}g(x)=-x\ne x=\lim_{t\to x^+}g(x).$ (If $x=1$ we need a different example.)
Also, it is essential the fact of $f$ bounded. Consider $f(x)=1/x^2$ if $x\ne 0$ and $f(0)=0.$ Then, $$\lim_{x\to 0^+} g(x)=\lim_{x\to 0^+} \frac{1}{x}=\infty\ne g(0).$$
A: Directly by definition. if $\;|f(x)|\le M\;\;\;\forall\,x\in [0,1]\;$, and if $\;\epsilon>0\;$ is arbitrary, we then choose
$$|x|<\frac\epsilon M\implies |g(x)-g(0)|=|x||f(x)|<\frac\epsilon MM=\epsilon$$
and since clearly $\;g(0)=0\;$ , we get $\;g\;$ is continuous from the right at $\;x=0\;$ .
