Uniform convergence of sequence of functions gn and fn

pointwise-convergencereal-analysissequence-of-functionuniform-convergence

Given two functions
$$f_n (x)= x\left(1+\frac{1}{n} \right), x \in \mathbb{R}, n \in \mathbb{N}$$
And
$$g_n (x)= \begin{cases} \frac{1}{n} ,& x \space \text{is irrational} \space \text{or} \space x=0, n \in \mathbb{N}\\ b+\frac{1}{n}, & x\in \mathbb{Q}, \text{say, }x=\frac{a}{b},b>0,n \in \mathbb{N}\end{cases}$$

It is said that these two sequence of functions are uniformly convergent in any bounded interval. If I use the definition i get pointwise convergent for the first sequence like:
$$|x\left(1+\frac{1}{n} \right)- x|=|\frac{x}{n}|<\epsilon$$
Here N depends on x also. I don't get how this sequence of functions is uniformly convergent in any bounded interval. I tried graphically and couldn't able to grasp it.

For second sequence $g_n$ i don't even understand the convergence in any bounded interval.
Can anyone help me see through these functions

Source of problem: $Tom M Apostol's$ Mathematical analysis pg. No. 247

Best Answer

If your functions are what I think you mean, then the pointwise limits should be $f(x)=x$ and

$$ g(x)= \begin{cases} 0 &,x\notin \mathbb{Q} \; \text{or} \; x=0 \\ q &, x=\frac{p}{q}\in \mathbb{Q}, \gcd(p,q)=1 \end{cases}. $$

In which case, you would get that $\vert f_n(x)-f(x)\vert= \frac{1}{n} \vert x \vert$ and $\vert g_n(x)-g(x)\vert= \frac{1}{n}$ for any $x\in \mathbb{R}$.

By definition, $h_n$ converges uniformly to $h$ on $A\subseteq \mathbb{R}$ if $M_n:= \underset{x\in A}{\sup} \vert h_n(x)-h(x)\vert \overset{n\to \infty}{\to} 0$.

If $A= [-K,K]$, can you see why these $M_n$ must converge to $0$?