Let $f,g$ be continuous functions. If we can always can get x,y s.t. $f(x)The whole question: Let $f,g:X\rightarrow \mathbb{R}$ be continuous at $a$. Supposing that for every neighborhood $V$ of $a$ exists points $x,y$ such that $f(x)<g(x)$ and $g(y)<f(y)$, prove that $f(a)=g(a)$.
I'm stuck. I've tried to fix some $\epsilon$ and by continuity get some neighborhood of $a$ and so get the points $x,y$ given by hyphotesis. But i couldn't work with them succesfully. I also tried the contrapositive, but i couldn't go much further.
Any hints on how to solve this problem?
 A: Consider the continuous function $h(x) = f(x) - g(x)$ over $X$.  We note that $\lim_{x \to a}h(x) = h(a)$, call this limit $L$.  Every neighborhood of $a$ contains an $x,y$ such that $h(x) < 0 < h(y)$.  However, by the definition of a limit: for any $\epsilon > 0$, we can select a neighborhood $V$ such that the $x,y \in V$ must also satisfy $|h(x) - L|< \epsilon$ and $|h(y) - L| < \epsilon$.  
Thus, for every $\epsilon > 0$, we have $-\epsilon < L < \epsilon$.
A: Proposition: Let $f:X\rightarrow \mathbb{R}$ continuous at $a$. If for every neighborhood of $a$ there exists $x,y$ s.t. $f(x)>0$ and $f(y)<0$, then $f(a)=0$. 
Proof: We prove the contrapositive. Supposing wlog that $f(a)<0$, since $f$ is continuous, there exists some neighborhood such that every point in it has the same signal.
Define $h:X\rightarrow \mathbb{R}$ by $h(x)=f(x)-g(x)$. Since $f,g$ are continuous, $h$ is also continuous. Let $V$ be a neighborhood of $a$ containing points $m,n$ such that $f(m)<f(n)$ and $g(n)<f(n)$. Hence, in this neighborhood we have $ h(m)<0$ and $h(n)>0$. Therefore, by our proposition, we say that $h(a)=0$, that is, $f(a)=g(a)$.
A: Assume for a contradiction that $f(a)\neq g(a).$ WLOG, assume that $f(a)>g(a)$.
Let $d=f(a)-g(a)$.
$\exists \delta_1$ such that $|x-a|<\delta_1 \implies |f(x)-f(a)|<\frac d2$.
$\exists \delta_2$ such that $|x-a|<\delta_2 \implies |g(x)-g(a)|< \frac d2$.
Let $\delta = \min \{ \delta_1 , \delta_2 \}$.
So, $|x-a|<\delta \implies |f(x)-f(a)-g(x)+g(a)| \leq |f(x)-f(a)|+|g(x)-g(a)|<\frac d2 +\frac d2 =d$.
So, $|x-a|<\delta \implies |f(x)-g(x)-d|<d$.
So, $|x-a|<\delta \implies -d<f(x)-g(x)-d<d \implies 0<f(x)-g(x)<2d$
So, $|x-a|<\delta \implies f(x)-g(x)>0$.
Thus, on a $\delta-$neighbourhood (call it $V$) of $a$, $\ f(x)>g(x)$ holds always.
Contradiction.
A: Let $ h(x) = f(x) - g(x)$. Consider intervals $(a -1/n ,a + 1/n)$ around a .
Thus by intermediate value theorem on the intervals we get a sequence of $ b_n$ such that $h(b_n) = 0$. Now the intersection of these intervals is just one point a and $ b_n \to a$, thus $h(a) = 0 \Rightarrow f(a) = g(a)$
