On uniform convergence Let $f:\mathbb{R}\times [0,1]\to\mathbb{R}$ be a continuous function and $\{x_n\}$ a sequence of real numbers converging to $x$. Define
$g_n(y)=f(x_n,y)$, $0\leq y\leq1$,
$g(y)=f(x,y)$, $0\leq y\leq1$.
Show that $g_n$ converges to $g$ uniformly on $[0,1]$.
I don't need a complete solution, but a bit of direction would be extremely useful. Thank you!
 A: Let $K=\{x,x_1,x_2,\cdots\}$. Then $K$ is a compact set and $f$ is continuous, hence uniformly continuous on $K \times [0,1]$. Now just write down the definition of uniform continuity and you will get the conclusion. 
A: Credit to Kavi.
$f$ is uniformly continuos on $K={x,x_1,x_2,...}×[0,y],$ compact.
$\epsilon >0$ given, there exists a $\delta >0$ s.t.
$||(x,'y')-(x,y)|| \lt \delta$ implies 
$|f(x',y')-f(x,y)| \lt \epsilon$.
With $y'=y$:
$||(x',y)-(x,y)|| \lt \delta$ implies
$|f(x',y)-f(x,y)| \lt \epsilon$, i.e.
$|x'-x| \lt \delta$ implies 
$|f(x',y)-f(x,y)| \lt \epsilon$.
Since $x_n$  converges to $x$:
For a $\delta >0$   there is a $n_0$ s.t.
for $n \ge n_0$ :
We have $|x_n -x| \lt \delta$ which implies 
$|f(x_n,y)-f(x,y)| \lt \epsilon$.
A: Let $\epsilon>0$ be given.
Now, $\left|g_n(y)-g(y)\right|=\left|f(x_n,y)-f(x,y)\right|$
As $f$ is continuous, therefore for each $y\in\left[0,1\right]$, $\exists N_{\epsilon,y}\in\mathbb{N}$ such that $\left|f(x_n,y)-f(x,y)\right|<\epsilon$ whenever $n\geq N_{\epsilon,y}$.  
Now, $\left[0,1\right]=\bigcup_{y\in\left[0,1\right]}(y-\epsilon,y+\epsilon)$. As $\left[0,1\right]$ is compact, there exists a finite subcover. Thus, there exists $m\in\mathbb{N}$ such that $\left[0,1\right]=\bigcup\limits_{i=1}^{m}(y_i-\epsilon,y_i+\epsilon)$. Now any $y\in\left[0,1\right]$ belongs to one of the intervals $(y_i-\epsilon,y_i+\epsilon)$ for some $i$. Thus, taking $N=$ max$\{N_{\epsilon,y_i}: i=1,2,...,m\}$, we get that $g_n$ converges to $g$ uniformly on $\left[0,1\right]$.
A: Here's a certainly much cleaner way (tbh, I didn't check your solution properly):
We want to show that $g_n$ converges uniformly to $g$, which is the same as asking that $$\lim_{n \to + \infty} \sup_{y \in [0,1]} \vert g_n(y)-g(y) \vert =0.$$ Now observe that $\vert g_n(y)-g(y)\vert$ is a continuous function on $[0,1]$ for each $n$, hence it attains its maximum. Therefore denote $y_n \in [0,1]$ such that $$\sup_{y \in [0,1]} \vert g_n(y)-g(y) \vert = \vert g_n(y_n)-g(y_n) \vert.$$ At the same time we have $$\vert g_n(y_n)-g(y_n) \vert=\vert f(x_n,y_n)-f(x,y_n) \vert.$$ Since $[0,1]$ is compact, we can pick a subsequence $y_{n_k}$ such that $y_{n_k}$ converges to some $y$ and as $x_n$ already converges to $x$ and so will its corresponding subsequence $x_{n_k}$. 
Using that $f$ is continuous in both entries now gives the desired claim:
$$\lim_{n \to \infty}\sup_{y \in [0,1]}\vert g_n(y)-g(y) \vert=\lim_{k \to \infty} \vert f(x_{n_k},y_{n_k})-f(x,y_{n_k})\vert=0. $$
