Consider the sequence of continuous functions $f_n(x) : \mathbb{R} \to \mathbb{R}$ defined by $f_n(x) = \frac{x}{n}$. In which of the following topologies: pointwise convergence, compact convergence, and uniform does $f_n(x)=\frac{x}{n}$ converge. What about when $f_n(x) = \frac{1}{n^3[x-(1/n)]^2 + 1}$?
We define the uniform topology on $Y^X$={functions from X to Y} as the topology with subbasis $\{B(f,ϵ):f\in Y^X,\epsilon>0\}$, where $B(f,ϵ)=\{g∈Y^X:\text{sup }_{x∈X} d(f(x),g(x))<ϵ\}$
and the compact convergence topology is generated by the collection of sets $B_C(f,ϵ)=\{g∈Y^X:\text{sup}_{x∈C} d(f(x),g(x))<ϵ\}$, with compact $C⊂X$
and the pointwise convergence topology is generated by the subbasis $S(X,U) = \{f|f \in Y^X \text{ and } f(x) \in U \}$ for $U$ open in $Y$.
Let us recall the definitions of pointwise, uniform and uniform on compact convergence.
Given functions $f_n : \mathbb R \to \mathbb R$ and $f : \mathbb R \to \mathbb R$, we say that :
$f_n \to f$ pointwise if for each $x \in \mathbb R$ we have $f_n(x) \to f(x)$.
$f_n \to f$ uniformly, if for all $\epsilon > 0$ there exists $N \in \mathbb N$ such that if $n > N$ then for all $x$ we have $|f_n(x) - f(x)| < \epsilon$.
$f_n \to f$ uniformly on compact sets, if for each compact set $K \subset R$, the restricted functions $f_n|_K$ and $f|_K$ satisfy $f_n|_K \to f|_K$ uniformly on $K$.
With this in mind, for $f_n = \frac xn$, we need a candidate function for $f$, where $f_n$ would converge pointwise. But, for each fixed $x$, the sequence $\frac xn$ clearly goes to zero. So, $f \equiv 0$ should work.
To see this, fix $x \in \mathbb R$. The point is, for pointwise convergence we are supposed to show for each fixed $x$ that $f_n(x) \to f(x)$, while in the uniform case we are supposed to specify $N$ before fixing $x$. That is the difference in the two forms of convergence.
But if $x$ is fixed, then the sequence $\frac xn$ clearly converges to $0$. Since this is true for all $x$, we see that $f_n$ converges pointwise to $0$.
But not uniformly Why? The intuition behind uniform convergence, is that in some sense, the rate at which $f_n(x) \to f(x)$ happens, should be the same for each $x$ (or at least uniform in some sense). Here, this is not the case, and we argue by contradiction. Suppose that $f_n \to f$ uniformly. Then, $f_n \to f$ pointwise(WHY?), so $f \equiv 0$ must happen. We know that for all $\epsilon > 0$ there exists $N$ such that $n > N$ implies $|f_n(x)| < \epsilon$ for all $x$. But this is false : let $\epsilon = 1$ . Then, if $N$ comes out from the definition of uniform continuity, take $x = N+2$ to see that $f_{N+1}(N+2) > 1 = \epsilon$, so it is not true that if $n > N$ then $|f_n(x)| < \epsilon$ for all $x$, as we showed by taking a specific $n$ and $x$.
In short, the rate of convergence to zero of $f_n(x)$ is not uniform : in fact, it gets slower as $x$ grows larger.
Uniformly on compacts? Let $K$ be compact. The candidate for uniform convergence on $K$ should again be the zero function. Let us fix $\epsilon > 0$. We are supposed to find $N$ such that if $n > N$ then $|f_n(x)| < \epsilon$ for all $x \in K$. Expanding, this is saying that $|x| < n\epsilon $ for all $x \in K$.
But a compact set is bounded! So let $M$ be such that $|x| < M$ for all $x \in K$. Simply pick $N > \frac{M}{\epsilon}$ an integer. Then, if $n > N$ we have $n\epsilon > M > |x|$, or that $|f_n(x)| < \epsilon$. Hence, uniform convergence on compacts is true here!
Use the ideas above to solve the second question.
First, find a candidate for pointwise convergence. If the convergence is uniform/uniform on compacts, then the candidate remains the same.
Study the values of $f_n(x)$ for various values of $x$ to check intuitively whether uniform convergence applies. Study $|f_n(x) - f(x)|$ for varying $n$ and $x$ : this gives you a good clue.
For compactness, you have to see if boundedness makes a difference to the rate of convergence.Usually, if $|f_n(x) - f(x)|$ has a bound related to an upper bound of the compact set, then this is helpful.