Clip Interval
This is the approximation of the characteristic Clip function, which depends on a certain interval \(I=[a,b]\) and returns \(x\) if \(x\in I\), otherwise the result is \(+1\) if \(x>b\) and \(-1\) if \(x<a\).
Approximation with erf
One approximation is done with the Error Function and is defined in terms of \(h\) and \(\delta\) as (see Figure From left to right the function Clip Interval with the \erf, its first and second derivative.):
where
The parameter \(\kappa\) is chosen such that \(f(1)=1-h\) therefore
Approximation with sin(atan())
Another possible approximation is with the help of the trigonometric functions \(\sin\) and \(\arctan\). The Clip function can be regularised in terms of \(h\) and \(\delta\) as (see Figure From left to right the function Clip Interval with SinAtan, its first and second derivative.):
The parameters are set so that \(f(1)=1-h\) and hence
Approximation with polynomials
The polynomial approximation of the Clip function in terms of \(h\) and \(\delta\) takes the form of (see Figure From left to right the function Clip Interval with polynomials, its first and second derivative.):
where
The coefficients are
Clip Rectangle
A function similar to the Clip function is the Clip Rectangle, which is defined as the characteristic function of an interval, i.e. \(\chi_{[0,1]}(x)\) for the interval \([0,1]\). The critical points are smoothed with the regularisation (see Figure From left to right the function Clip Rectangle, its first and second derivative.):
so that \(\mathrm{clip}'_{\textrm{R}}(1)=-1/h\). The value of \(\kappa\) is chosen according to the previous requirement, and is computed numerically with an iterative procedure.
Clip Reciprocal
The function Clip Reciprocal (see Figure From left to right the function Clip Reciprocal with its first and second derivative.) is the approximation of the function \(\min(a,1/x)\). The constant \(a\) is given by the user, the parameter \(h\) is the tolerance of:
with coefficients
Clip Superior
The function Clip Superior is the approximation of the function \(\min(a,x)\). The constant \(a\) is given by the user, the parameter \(h\) is the tolerance of (see Figure From left to right the function Clip Superior, its first and second derivative.):
where \(\kappa\) is {\color{red}chosen to satisfy \(\mathrm{clip}_{\textrm{sup}}(a) =a-h\), and thus} is \(\kappa = \frac{1}{2h\sqrt{\pi}}\).