limit of sequences of functions and uniform convergence I have two sequences of functions:
$$ h_n(x) = (x-\frac1n)^2 \qquad \text{for   } x \in [0,1]
$$ 
$$k_n(x) = (x-\frac1n)^2 \qquad \text{for   } x \in \mathbb R
$$
I need to find their limits and determine whether the convergence is uniform.
How are these two sequences different?
 A: 
How are these two sequences different?

As you said yourself, $h_n$ is a sequence of functions on $[0, 1]$, while $k_n$ is a sequence of functions on $\mathbb{R}$.
I like to think of $h_n$ as a sequence of points in the geometric space of continuous functions on $[0, 1]$, which I'll call $\mathcal{C}([0,1])$. Similarly, let's think of $k_n$ as a sequence of points in the space $\mathcal{C}(\mathbb{R})$ of continuous functions on $\mathbb{R}$.
The different convergence properties of the sequences $h_n$ and $k_n$ come from geometric differences between $\mathcal{C}([0,1])$ and $\mathcal{C}(\mathbb{R})$.

To understand $\mathcal{C}([0,1])$ and $\mathcal{C}(\mathbb{R})$ geometrically, it's useful to first understand a simpler space, $\mathcal{C}(\{1, 2, 3\})$. This is the space of continuous functions on a set of three discrete points.
To define a function $f$ on $\{1, 2, 3\}$, you just pick three real numbers: $f_1, f_2, f_3$. Because $\{1, 2, 3\}$ is discrete, every function on it is automatically continuous. Therefore, an element of $\mathcal{C}(\{1, 2, 3\})$ is just an ordered triple of real numbers. For example, $(0, 0, 1)$ and $(\pi/6, 1/2, \sqrt{3}/2)$ are both elements of $\mathcal{C}(\{1,2,3\})$.
You've probably seen ordered triples like $(0, 0, 1)$ and $(\pi/6, 1/2, \sqrt{3}/2)$ before: in geometry, you use them as coordinates for points in three-dimensional space. That means you can think of functions on $\{1, 2, 3\}$ as points in three-dimensional space!
Three-dimensional space has a lot of geometric structure. For example, it has:


*

*An origin, the point $(0, 0, 0)$.

*A way to add points together: $(f_1, f_2, f_3) + (g_1, g_2, g_3) = (f_1 + g_1, f_2 + g_2, f_3 + g_3)$.

*A way to scale a point by a real number: $\alpha(f_1, f_2, f_3) = (\alpha f_1, \alpha f_2, \alpha f_3)$.

*A way to measure distance from the origin: $\|(f_1, f_2, f_3)\| = \sqrt{f_1^2 + f_2^2 + f_3^2}$.

*A way to measure distance between any two points: $d(f, g) = \|f - g\|$.


As you've probably learned, having a way of measuring distances is useful, because it lets you talk about limits of sequences.
The way of measuring lengths that I mentioned above is not the only way of measuring distances in three-dimensional space. Here are two other ways of measuring distances:


*

*The "taxicab distance," $\|f\|_\text{taxi} = |f_1| + |f_2| + |f_3|$.

*The "uniform distance," $\|f\|_\text{unif} = \max_{k \in \{1,2,3\}} |f_k|$.


Unlike the usual way of measuring distances, these two ways depend on which coordinate system you pick. That makes them bad for thinking about points in three-dimensional space, but good for thinking about functions on $\{1, 2, 3\}$, because functions come with a natural coordinate system: the function values $f_1, f_2, f_3$.

Now, let's go back to $\mathcal{C}([0,1])$ and $\mathcal{C}(\mathbb{R})$. Just like $\mathcal{C}(\{1,2,3\})$, these spaces each have an origin, a way to add points, and a way to scale points. They also each have a way to measure distances. The uniform distance generalizes from $\mathcal{C}(\{1,2,3\})$ to $\mathcal{C}([0,1])$ in an obvious way: for a continuous function $f$ on $[0,1]$, you can define $$\|f\|_\text{unif} = \max_{x \in [0, 1]} |f(x)|.$$
The supremum distance generalizes to $\mathcal{C}(\mathbb{R})$ too, but in a less obvious way. On $\mathbb{R}$, the function $|f|$ may not have a maximum, so you instead measure its "supremum": $$\|f\|_\text{unif} = \sup_{x \in \mathbb{R}} |f(x)|.$$ This is defined as the smallest number greater than or equal to every value of $|f|$, which may be "$\infty$."
When people say that a sequence of functions "converges uniformly," they just mean that it converges according to the uniform distance. Now, ask yourself two questions:


*

*What is the uniform distance $\|h_1 - h_2\|$ between $h_1$ and $h_2$? What about the uniform distance between $h_{1001}$ and $h_{1002}$?

*What is the uniform distance between $k_1$ and $k_2$? What about the uniform distance between $k_{1001}$ and $k_{1002}$?

A: $h_n$ are on a compact sets, while $k_n$ are on the whole real line.
For uniform convergence, it can make a difference: the sequence $f_n(x)=x/n$ ($x\in \mathbb{R}$) converges to $f\equiv 0$ on any compact, but not uniformly since
$$\sup_{x\in \mathbb{R}} |f_n(x)|\equiv +\infty \ for\ any\ n,$$
while for any compact $K$
$$ \sup_{x\in K}|f_n(x)|\leq \sup_{y\in K} |y|/n\to 0.  $$
You situation is quite similar.
