show that the set $\{f \in C([0,1], \Bbb R) \mid \int_0^1 f(x)\,dx \in (0,3) \}$ is an open set Trying to show that the set 
$\{f \in C([0,1], \Bbb R) \mid \int_0^1 f(x)\,dx \in (0,3) \}$ is an open set,  using the metric $d(f,g)= \sup(\|f(x)-g(x)\|)$ for every $x \in \Bbb R$ . I have a few questions
First of all for the epsilon ball am I to consider functions from $\Bbb R \rightarrow \Bbb R$, or rather from $[0,1] \rightarrow \Bbb R$?
Further I am not sure why if $d(f,g) = \varepsilon/3$, then is it true that any function that is an epsilon distance away from a uniformly continuous function must be continuous. I would suspect so with a proof like since $f$ is uniformly continuous, there exists for every $\varepsilon > 0$, a $\delta >0$ with $|x-y|<\delta$ implying $|f(x)-f(y)| < \varepsilon/3 $ , hence $|g(x)-g(y)| < |g(x)-f(x)| + |f(x)-f(y)| + |f(y)-g(y)| < \varepsilon$, and so g is continuous.
Finally I am not sure how to proceed to show that if $f,g$ are some distance away than the integral of $g$ on $[0,1]$ must be in $(0,3)$, I suspect it will involve absolute value identities for integrals but I am stumped at the moment. Hints appreciated.
 A: The application 
$$
\Gamma : C([0,1],\mathbb{R}) \to \mathbb{R}
\\ f \mapsto\int_0^1f(t)\,dt
$$
is continuous (even more so, it is Lipschitz) with respect to the $d_\infty$ metric: 
$$
\big|\Gamma(f)-\Gamma(g)\big| = \left|\int_0^1(f-g)(t)\,dt\right| \leq 
 \int_0^1|(f-g)(t)|\,dt \leq (1-0)d_\infty(f,g) 
$$
Equivalently, preimages of open sets of $\mathbb{R}$ via $\Gamma$ will be open. It suffices then to note that your set is exactly $\Gamma^{-1}(0,3)$.
A: I want to address your first question by saying that it is not true. For example take the function $g$ that is one on $\mathbb{Q}$ and $0$ on all $\mathbb{R}\setminus\mathbb{Q}$. Then, if you add $\epsilon\cdot g(x)$ to a continuous $f$, then the resulting function will be $\epsilon$ a way and not continuous. If you, however, asserted that this $g$ is of distance $\epsilon$ for all $\epsilon>0$, then $g$ just has to equal $f$ and everything is trivial.
A good notion to make here is that the open ball that you are going to pick is defined as open in $C([0,1],\mathbb{R})$, so you don't have to worry about $g$ being continuous.
To address the second part of the question, I'll give you a hint. Think about given a certain $f$, which integrates to something close to $3$ (or $0$), let's say it's an $\epsilon>0$ away from one of those. Then, it is probably going to work with a ball of radius $<\epsilon/3$.
Sketch this first and try to visualize the problem. It should then be more clear how it works.
I hope this helps and if you have any questions, feel free to comment!
