# Ramp function

Graph of the ramp function

The ramp function is a unary real function, easily computable as the mean of the independent variable and its absolute value.

This function is applied in engineering (e.g., in the theory of DSP). The name ramp function is derived from the appearance of its graph.

## Definitions

The ramp function (R(x) : ℝ → ℝ) may be defined analytically in several ways. Possible definitions are:

• A system of equations:
${\displaystyle R(x):={\begin{cases}x,&x\geq 0;\\0,&x<0\end{cases}}}$
• The max function:
${\displaystyle R(x):=\max(x,0)}$
• The mean of a straight line with unity gradient and its modulus:
${\displaystyle R(x):={\frac {x+|x|}{2}}}$
this can be derived by noting the following definition of max(a,b),
${\displaystyle \max(a,b)={\frac {a+b+|a-b|}{2}}}$
for which a = x and b = 0
• The Heaviside step function multiplied by a straight line with unity gradient:
${\displaystyle R\left(x\right):=xH(x)}$
• The convolution of the Heaviside step function with itself:
${\displaystyle R\left(x\right):=H(x)*H(x)}$
• The integral of the Heaviside step function:[1]
${\displaystyle R(x):=\int _{-\infty }^{x}H(\xi )\,d\xi }$
• Macaulay brackets:
${\displaystyle R(x):=\langle x\rangle }$

## Analytic properties

### Non-negativity

In the whole domain the function is non-negative, so its absolute value is itself, i.e.

${\displaystyle \forall x\in \mathbb {R} :R(x)\geq 0}$

and

${\displaystyle \left|R(x)\right|=R(x)}$
• Proof: by the mean of definition 2, it is non-negative in the first quarter, and zero in the second; so everywhere it is non-negative.

### Derivative

Its derivative is the Heaviside function:

${\displaystyle R'(x)=H(x)\quad {\mbox{for }}x\neq 0.}$

### Second derivative

The ramp function satisfies the differential equation:

${\displaystyle {\frac {d^{2}}{dx^{2}}}R(x-x_{0})=\delta (x-x_{0}),}$

where δ(x) is the Dirac delta. This means that R(x) is a Green's function for the second derivative operator. Thus, any function, f(x), with an integrable second derivative, f″(x), will satisfy the equation:

${\displaystyle f(x)=f(a)+(x-a)f'(a)+\int _{a}^{b}R(x-s)f''(s)\,ds\quad {\mbox{for }}a

### Fourier transform

${\displaystyle {\mathcal {F}}{\big \{}R(x){\big \}}(f)=\int _{-\infty }^{\infty }R(x)e^{-2\pi ifx}\,dx={\frac {i\delta '(f)}{4\pi }}-{\frac {1}{4\pi ^{2}f^{2}}},}$

where δ(x) is the Dirac delta (in this formula, its derivative appears).

### Laplace transform

The single-sided Laplace transform of R(x) is given as follows,

${\displaystyle {\mathcal {L}}{\big \{}R(x){\big \}}(s)=\int _{0}^{\infty }e^{-sx}R(x)dx={\frac {1}{s^{2}}}.}$

## Algebraic properties

### Iteration invariance

Every iterated function of the ramp mapping is itself, as

${\displaystyle R{\big (}R(x){\big )}=R(x).}$
• Proof:
${\displaystyle R{\big (}R(x){\big )}:={\frac {R(x)+|R(x)|}{2}}={\frac {R(x)+R(x)}{2}}=R(x).}$

This applies the non-negative property.