Rectangle function
   HOME

TheInfoList



OR:

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 \operatorname(t) = \Pi(t) = \left\{\begin{array}{rl} 0, & \text{if } , t, > \frac{1}{2} \\ \frac{1}{2}, & \text{if } , t, = \frac{1}{2} \\ 1, & \text{if } , t, < \frac{1}{2}. \end{array}\right. Alternative definitions of the function define \operatorname{rect}\left(\pm\frac{1}{2}\right) to be 0, 1, or undefined.


History

The ''rect'' function has been introduced by Woodward in 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: \operatorname{rect}\left(\frac{t-X}{Y} \right) = u(t - (X - Y/2)) - u(t - (X + Y/2)) = u(t - X + Y/2) - u(t - X - Y/2) where u is the Heaviside function; the function is centered at X and has duration Y, from X-Y/2 to X+Y/2.


Fourier transform of the rectangular function

The unitary Fourier transforms of the rectangular function are \int_{-\infty}^\infty \mathrm{rect}(t)\cdot e^{-i 2\pi f t} \, dt =\frac{\sin(\pi f)}{\pi f} = \mathrm{sinc}{(f)}, using ordinary frequency , where \mathrm{sinc} is the normalized form of the sinc function and \frac{1}{\sqrt{2\pi\int_{-\infty}^\infty \mathrm{rect}(t)\cdot e^{-i \omega t} \, dt =\frac{1}{\sqrt{2\pi\cdot \frac{\mathrm{sin}\left(\omega/2 \right)}{\omega/2} =\frac{1}{\sqrt{2\pi \mathrm{sinc}\left(\omega/2 \right), using angular frequency \omega, where \mathrm{sinc} is the unnormalized form of the sinc function. Note that as long as the definition of the pulse function is only motivated by its behavior in the time-domain experience, there is no reason to believe that the oscillatory interpretation (i.e. the Fourier transform function) should be intuitive, or directly understood by humans. However, some aspects of the theoretical result may be understood intuitively, as finiteness in time domain corresponds to an infinite frequency response. (Vice versa, a finite Fourier transform will correspond to infinite time domain response.)


Relation to the triangular function

We can define the triangular function as the
convolution In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution'' ...
of two rectangular functions: \mathrm{tri} = \mathrm{rect} * \mathrm{rect}.\,


Use in probability

Viewing the rectangular function as a
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) ca ...
, it is a special case of the continuous uniform distribution with a = -1/2, b = 1/2. The
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
is \varphi(k) = \frac{\sin(k/2)}{k/2}, and its
moment-generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
is M(k) = \frac{\sinh(k/2)}{k/2}, where \sinh(t) 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 circle with a unit radius, the points form the right half of the un ...
function.


Rational approximation

The pulse function may also be expressed as a limit of a rational function: \Pi(t) = \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1}


Demonstration of validity

First, we consider the case where , t, <\frac{1}{2}. Notice that the term (2t)^{2n} is always positive for integer n. However, 2t<1 and hence (2t)^{2n} approaches zero for large n. It follows that: \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \frac{1}{0+1} = 1, , t, <\tfrac{1}{2} Second, we consider the case where , t, >\frac{1}{2}. Notice that the term (2t)^{2n} is always positive for integer n. However, 2t>1 and hence (2t)^{2n} grows very large for large n. It follows that: \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \frac{1}{+\infty+1} = 0, , t, >\tfrac{1}{2} Third, we consider the case where , t, = \frac{1}{2}. We may simply substitute in our equation: \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{1^{2n}+1} = \frac{1}{1+1} = \tfrac{1}{2} We see that it satisfies the definition of the pulse function. Therefore, \mathrm{rect}(t) = \Pi(t) = \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \begin{cases} 0 & \mbox{if } , t, > \frac{1}{2} \\ \frac{1}{2} & \mbox{if } , t, = \frac{1}{2} \\ 1 & \mbox{if } , t, < \frac{1}{2}. \\ \end{cases}


See also

* Fourier transform * Square wave *
Step function In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having onl ...
* Top-hat filter


References

{{DEFAULTSORT:Rectangular Function Special functions