Find a sequence of continuous functions that converges to a piecewise function

38 Views Asked by At

Let $f(x)= \left\{ \begin{array}{lc} 0, & x \leq 0 \\ \\ 1, & 0 < x \\ \end{array} \right.$

Find a sequence of $f_{n}$ such each one of $f_{n}: \mathbb{R} \rightarrow \mathbb{R}$ is continuous and $f_{n}(x) \rightarrow f(x)$ for all $x \in \mathbb{R}$.

I think

$$f_{n}(x)= \left\{ \begin{array}{lc} \frac{1}{n}x, & x \leq 0 \\ \\ x^{\frac{1}{n}}, & 0 < x \\ \end{array} \right.$$ could work, Am I right?