The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function, gate function, unit pulse, or the normalized
boxcar function) is defined as
Alternative definitions of the function define
to be 0, 1, or undefined.
Its periodic version is called a ''
rectangular wave''.
History
The ''rect'' function has been introduced 1953 by
Woodward in "Probability and Information Theory, with Applications to Radar" as an ideal
cutout operator, together with the
''sinc'' function as an ideal
interpolation operator, and their counter operations which are
sampling (
''comb'' operator) and
replicating (
''rep'' operator), respectively.
Relation to the boxcar function
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
Fourier transform of the rectangular function
The
unitary Fourier transforms of the rectangular function are
using ordinary frequency , where
is the normalized form
[Wolfram MathWorld, https://mathworld.wolfram.com/SincFunction.html] of the
sinc function and
using angular frequency
, where
is the unnormalized form of the
sinc function.
For
, its Fourier transform is
Relation to the triangular function
We can define the
triangular function
A triangular function (also known as a triangle function, hat function, or tent function) is a function whose graph takes the shape of a triangle. Often this is an isosceles triangle of height 1 and base 2 in which case it is referred to as ''th ...
as the
convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
of two rectangular functions:
Use in probability
Viewing the rectangular function as a
probability density function
In probability theory, a probability density function (PDF), density function, or density of an absolutely continuous random variable, is a Function (mathematics), function whose value at any given sample (or point) in the sample space (the s ...
, it is a special case of the
continuous uniform distribution
In probability theory and statistics, the continuous uniform distributions or rectangular distributions are a family of symmetric probability distributions. Such a distribution describes an experiment where there is an arbitrary outcome that li ...
with
The
characteristic function is
and its
moment-generating function is
where
is the
hyperbolic sine
In mathematics, hyperbolic functions are analogues of the ordinary trigonometric functions, but defined using the hyperbola rather than the circle. Just as the points form a unit circle, circle with a unit radius, the points form the right ha ...
function.
Rational approximation
The pulse function may also be expressed as a limit of a
rational function
In mathematics, a rational function is any function that can be defined by a rational fraction, which is an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be ...
:
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,
Dirac delta function
The rectangle function can be used to represent the
Dirac delta function
In mathematical analysis, the Dirac delta function (or distribution), also known as the unit impulse, is a generalized function on the real numbers, whose value is zero everywhere except at zero, and whose integral over the entire real line ...
.
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.
See also
*
Fourier transform
In mathematics, the Fourier transform (FT) is an integral transform that takes a function as input then outputs another function that describes the extent to which various frequencies are present in the original function. The output of the tr ...
*
Square wave Square wave may refer to:
*Square wave (waveform)
A square wave is a non-sinusoidal waveform, non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same ...
*
Step function
*
Top-hat filter
*
Boxcar function
References
{{DEFAULTSORT:Rectangular Function
Special functions