[Math] $(f_n(x))$ converges to a discontinuous function Counterexample

uniform-convergence

If the sequence of functions $(f_n(x))$ converges to a discontinuous function
$f(x)$ on a set S, then the sequence does not converge uniformly on S.

If a function $f(x)$ is defined on [−1, 1] and continuous at $x = 0$, then f
is continuous on some open interval containing zero

Can anyone show me a counter example to these? I am struggling to find one, thank you.

Best Answer

For your second question, let $g(x)=0$ if $x$ is rational, and let $g(x)=1$ if $x$ is irrational. Let $f(x)=xg(x)$. Then $f$ is continuous at $x=0$ and nowhere else.

Related Question