For every bounded function $f:[a,b] \to \mathbb R$ on a closed bounded interval $[a,b]$ , which is dis-continuous at at most countably many points of its domain ; can we find a sequence of real-valued functions $\{f_n\}$ with domain $[a,b]$ such that each $f_n$ is dis-continuous at only finitely many points of its domain and $\{f_n\}$ converges uniformly to $f$ on $[a,b]$ ? If such a sequence of functions can not be found for every $f$ , can we impose some extra condition on $f$ such that such a sequence can be found ?
( For such functions $f$ , since each $f_n$ is easily shown to be Riemann-integrable , we can conclude , due to uniform convergence , that $f$ is Riemann integrable )
No. Put $[a,b]=[0,1]$, $A=\{0\}\cup\{1/n:n\in\Bbb N\}$, $f|A=1$ and $f|[0,1]\setminus A=0$. Then the function $f$ is discontinuous at each point of the set $A$ and is continuous at each point of the set $[0,1]\setminus A$. Moreover, if $g:[0,1]\to\Bbb R$ is a function such that $|f(x)-g(x)|<1/3$ for each $x\in [0,1]$ then the function $g$ is discontinuous at each point of the set $A$ too.