Is there a single, continuously differentiable function $g(x,k)$ that approximates the following:
$f(x)= \begin{cases} 0 & x<0 \\ x & 0 \le x \le 1 \\ 1 & x>1\end{cases}$
$k$ is a real parameter such that $g \rightarrow f$ as $k \gg 1$
Edit: 1. I apologise for my lack of rigour; I'm the worst kind of mathematician: an engineer ;)
I realise that my question doesn't imply that $g(x,k)$ is bounded by [0,1] for all $x$. So that's an additional constraint. Thus I'm not sure a Fourier series will be satisfactory in this case.
What I mean by $g \rightarrow f$ is that $\left| g(x,k) - f(x) \right| < \epsilon$ for any given $x$ and a small positive number $\epsilon$ for a sufficiently large $k$.