I have a bounded function,
$$ y= \begin{cases} 1 & \text{if $x>1$} \\ x & \text{if $0\leq x\leq 1$}\\ 0 &\text{if $x < 0$} \end{cases} $$ Does anyone know any simple math function to represent $y$? (not using a piece-wise function)
For example, Heaviside function is a similar approach.
Thanks
$$y=x[x>0] + (1-x)[x>1]$$ Where $[x>0]$ denotes the Iverson bracket, equalling $1$ if the expression is true, and $0$ otherwise. You can also use an indicator function if you prefer.