Can the following conditional value be expressed using the min and max functions?

25 Views Asked by At

For example, consider $y$ such that $$ y=\cases{c, & if $c\le0$,\\0, & if $c>0$.} $$ Then, it can be easily expressed as $$y=\min\{c, 0\}.$$


Using the above trick, can I express the following $y$ using $\max$ or $\min$ ? $$ y = \cases{c, & if $c\le d$,\\ 0, & if $c>d$.}$$

1

There are 1 best solutions below

1
On BEST ANSWER

The second function is discontinuous, you will need an extra "step" term, like

$$y=\min\{c-d,0\}+d\cdot(c\le d).$$

If you don't mind having an undefined value at $c=d$, you can "emulate" with

$$y=\min\{c-d,0\}\frac c{c-d}.$$