$f,g :A\to R$continuous functions and $p\in A$ s.t $f(p)>g(p)$ prove $\exists \delta >0$ such that $f(x)>g(x) \forall x \in A$ s.t $|x-p|< \delta$. Let $f,g :A\to R$ be two continuous functions and let $ p\in A$ be such that $f(p)>g(p) $. Show that there exists $\delta >0$ such that $f(x)>g(x) \forall x \in A $ that satisfies $|x-p|< \delta$.
I think I can visualize it, and thought starting by the minimum $p'$ such that $f(p')>g(p')$ as both functions are continuous I can add some $\delta$ to it such that $f(p'+\delta )>g(p'+\delta )$ iff $f(p') + \epsilon2 >g(p') + \epsilon1$ and this $\delta$ should be defined as the minimum required by $g$ and $f$ for $\epsilon2$ and $\epsilon1$ respectively.
But it doesnt seems to be very formal, is this proof right? Or am I misunderstanding something? Thanks in advance.
 A: Your intuition is mostly correct, as is your concern that your argument is too informal.
Let's see if this helps: the $\epsilon$-$\delta$ definition of continuity says that given $\epsilon_1>0$, there is some $\delta_1>0$ such that
$$|x-p|<\delta_1\implies |f(x)-f(p)|<\epsilon_1.$$
Equivalently, in interval notation, we have
$$x\in (p-\delta_1,p+\delta_1)\implies f(x)\in(f(p)-\epsilon_1,f(p)+\epsilon_1).$$
We get the same thing for $g$: given $\epsilon_2>0$ there is $\delta_2>0$ such that
$$x\in (p-\delta_2,p+\delta_2)\implies g(x)\in(g(p)-\epsilon_2,g(p)+\epsilon_2).$$
Examining these inequalities, we see that if $x$ is sufficiently close to $p$ (specifically, when $|x-p|<\delta$ for $\delta=\min(\delta_1,\delta_2)$), then we have $f(x)>f(p)-\epsilon_1$ and $g(p)+\epsilon_2>g(x)$. So we should choose $\epsilon_1$ and $\epsilon_2$ in such a way that
$$f(p)-\epsilon_1\geq g(p)+\epsilon_2.$$
Let's make life easier for ourselves and suppose $\epsilon_1=\epsilon_2$. Can you find $\epsilon>0$ such that $f(p)-g(p)\geq 2\epsilon$? Why or why not?
Once you've figured out what $\epsilon>0$ should be, we will have
$$f(x)>f(p)-\epsilon\geq g(p)+\epsilon>g(x)$$
for all $x\in (p-\delta,p+\delta)$, as desired.
A: Look at $h(x)=f(x)-g(x)$. By Assumption, $h$ is continuous and $h(p)>0$.
Suppose, on the contrary, that for every $\delta>0$ you can find some $x\in A$ such that $|x-p|<\delta$ but $h(x)\leq 0$. Then you could find such an $x_1$ for $\delta=1$, and an $x_2$ for $\delta=\frac{1}{2}$, and so on an $x_n$ for $\delta=\frac{1}{n}$, and thus you can find a sequence $x_n\in A$ such that $|x_n-p|<\frac{1}{n}$ but $h(x_n)\leq 0$. Since $x_n\to p$, the continuity of $h$ implies $\lim_{n\to\infty}h(x_n)=h(p)\leq 0$. This is a contradiction.
