Let f,g be continous functions from X to Y. Let E be a dense subset of X. Show if $f(x)=g(x) \forall x \in E$, then f(x)=g(x) $\forall x \in X$. I'm trying to prove that if f,g are continuous functions, and if E is a dense subset of X $(\text{or } Cl(E) = X)$ and if $f(x)=g(x) \forall x \in E$ then $f(x)=g(x) \forall x \in X$. 
I understand that if f,g are continuous, then:

$\exists \delta_1, \delta_2$ such that $\forall X \in E$ with $d(x,p)< \delta_1$, $|f(x) - f(p)| < \epsilon$ and similarly $\forall X \in E$ with $d(x,p)< \delta_2$, $|g(x) - g(p)| < \epsilon$

And by definition of closure, I know that:

$Cl(E) = E \cup E'$ where E' is the set accumulation points of E, where p is an accumulation point if $\forall r>0, (E\cup N_r(p)) \backslash \{p\} \neq \emptyset $

I have zero clue on how to approach this problem. If $f(x) = g(x)$, then I'm guessing it implies that $|f(x) - f(p)| = |g(x) - g(p)|$. And so I'm guessing that $\delta_1 = \delta_2$. 
Help would be very much appreciated. 
 A: Rememer that $x\in Cl(E)$ if and only if there is a sequence of elements in $E$ which converges to $x$.
If $\{x_n\}$ is a sequence in $X$ such that $\lim_{n \to \infty}x_n=x$ for some $x\in X$ then $\lim_{n\to \infty}f(x_n)=f(x)$ and $\lim_{n\to \infty}g(x_n)=g(x)$ since $f$ and $g$ are continuous in $X$. For $x$ there is a sequence $\{y_n\}$ of elements in $E$ such that $\lim_{n \to \infty}y_n=x$. Then 
$$\lim_{n \to \infty}f(y_n)=f(x)$$ and
$$\lim_{n \to \infty}g(y_n)=g(x).$$
But $y_n \in E$ for all natural $n$, hence $f(x)=g(x)$.
A: Suppose that $f(a)\neq g(a);a\in X$.
Let $d(f(a),g(a))=r>0$.
Since $f$ is continuous at $a$ so $\exists \delta_1>0$ such that $f(B(a,\delta_1))\subset B(f(a),\frac{r}{3})$.
Since $g$ is continuous at $a$ so $\exists \delta_2>0$ such that $g(B(a,\delta_2))\subset B(g(a),\frac{r}{3})$.
Take $\delta=\min\{\delta_1,\delta_2\}$.
Then $f(B(a,\delta))\subset B(f(a),\frac{r}{3})$ and $g(B(a,\delta))\subset B(g(a),\frac{r}{3})$.
Since $E$ is dense in $X$ so $B(a,\delta)\cap E\neq \emptyset$. Let  $k\in B(a,\delta)$. Then $f(k)=g(k)$
Then $f(k)\in B(f(a),\frac{r}{3})$ and $g(k)\in B(g(a),\frac{r}{3})$ .
Hence we have $d(f(a),g(a))\le d(f(a),f(k))+d(f(k),g(k))+d(g(k),g(a))<\dfrac{2r}{3}$
which is false as $d(f(a),g(a))=r$.
A: A little bit late, but I decided to give an alternate answer without using contradiction or the sequence definition of continuity. Let $p \in X$ and $\epsilon > 0$ be given.  If $p \in E$ we are done, otherwise $p$ is a limit point of $E$.  By continuity of $f, g$, there exists $\delta_1, \delta_2 >0$ s.t. $\forall x \in X$ we have $d(p,x) < \delta_1 \implies d(f(x), f(p)) < \epsilon/2$ and $d(p, x) < \delta_2 \implies d(g(p), g(x)) < \epsilon/2$.  Set $\delta = \min\{\delta_1, \delta_2\}$.  Since $E$ is dense in $X$, there is some $q \in E \cap B_{\delta}(p) \backslash \{p\}$. Thus, we have that $d(f(p), g(p)) \leq d(f(p), f(q)) + d(f(q), g(q)) + d(g(q),g(p)) < \epsilon$.  Finally, since $\epsilon$ was arbitrary, we conclude that $d(f(p), g(p)) = 0 \implies f(p) = g(p)$ for all $p \in X$.
Note: $d(f(q), g(q)) = 0$ since $f,g$ agree on $E$ by hypothesis.
