Rectangular function - Wikiwand
The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function,[1] gate function, unit pulse, or the normalized boxcar function) is defined as[2]

Alternative definitions of the function define to be 0,[3] 1,[4][5] or undefined.
Its periodic version is called a rectangular wave.
The rect function has been introduced by Woodward[6] in [7] as an ideal cutout operator, together with the sinc function[8][9] as an ideal interpolation operator, and their counter operations which are sampling (comb operator) and replicating (rep operator), respectively.
The rectangular function is a special case of the more general boxcar function:
where is the Heaviside step function; the function is centered at
and has duration
, from
to

The unitary Fourier transforms of the rectangular function are[2]
using ordinary frequency f, where
is the normalized form[10] of the sinc function and
using angular frequency
, where
is the unnormalized form of the sinc function.
For , its Fourier transform is
We can define the triangular function as the convolution of two rectangular functions:
Viewing the rectangular function as a probability density function, it is a special case of the continuous uniform distribution with The characteristic function is
and its moment-generating function is
where is the hyperbolic sine function.
The pulse function may also be expressed as a limit of a rational function:
Demonstration of validity
First, we consider the case where Notice that the term
is always positive for integer
However,
and hence
approaches zero for large
It follows that:
Second, we consider the case where Notice that the term
is always positive for integer
However,
and hence
grows very large for large
It follows that:
Third, we consider the case where We may simply substitute in our equation:
We see that it satisfies the definition of the pulse function. Therefore,
The rectangle function can be used to represent the Dirac delta function .[11] Specifically,
For a function
, its average over the width
around 0 in the function domain is calculated as,
To obtain
, the following limit is applied,
and this can be written in terms of the Dirac delta function as,
The Fourier transform of the Dirac delta function
is
where the sinc function here is the normalized sinc function. Because the first zero of the sinc function is at
and
goes to infinity, the Fourier transform of
is
means that the frequency spectrum of the Dirac delta function is infinitely broad. As a pulse is shorten in time, it is larger in spectrum.