This site is supported by donations to The OEIS Foundation.

Rectangular function

From OeisWiki
(Redirected from Boxcar function)
Jump to navigationJump to search


This article needs more work.

Please help by expanding it!


The rectangular function rect(t),t, (also known as the rectangle function, rect function, Pi function, gate function, unit pulse, or the normalized boxcar function) is defined as

rect(t)=(t)={0if |t|>12,12if |t|=12,1if |t|<12.

Alternate definitions of the function define rect(±12) to be 0, 1, or undefined.

Relation to the Heaviside step function

[edit]

The rectangular function may be expressed in terms of the Heaviside step function as

rect(t)=H(t+12)H(t12)=H(t+12)+H(t+12)1=H(14t2).

For a duration T, we have

rect(tT)=H(t+T2)H(tT2)=H(t+T2)+H(t+T2)1=H(T24t2).

Relation to the sign function

[edit]
rect(t)=12(sgn(t+12)sgn(t12)).

For a duration T, we have

rect(tT)=12(sgn(t+T2)sgn(tT2)).

Relation to the boxcar function

[edit]

The rectangular function is a special case of the more general boxcar function

rect(tτT)=H(tτ+T2)H(tτT2)=H(tτ+T2)+H(t+τ+T2)1=H(T24(tτ)2),
rect(tτT)=12(sgn(tτ+T2)sgn(tτT2)),

where the function is centered at τ and has duration T.

Fourier transform of the rectangular function

[edit]

The unitary Fourier transforms of the rectangular function are

rect(t)ei2πftdt=sinπfπf=sincπf=sincπf,

and

12πrect(t)eiωtdt=12πsincπ(ω2π)=12πsinc(ω2),

where sinc is the unnormalized sinc function and sincπ is the normalized sinc function.

Note that as long as the definition of the pulse function is only motivated by the time-domain experience of it, 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, such as the infinite bandwidth requirement incurred by the indefinitely-sharp edges in the time-domain definition.

Relation to the triangular function

[edit]

We can define the triangular function as the convolution of two rectangular functions

tri(t)=(rect*rect)(t)=rect(τ)rect(tτ)dτ.

Use in probability

[edit]

Viewing the rectangular function as a probability density function, it is a special case of the continuous uniform distribution with (a,b)=(12,12). The characteristic function is

φ(k)=sin(k2)k2=sinc(k2),

and its moment generating function is

M(k)=sinh(k2)k2,

where sinh(t) is the hyperbolic sine function.

Rational approximation

[edit]

The pulse function may also be expressed as a limit of a rational function

(t)=limnn1(2t)2n+1.

Demonstration of validity

[edit]

First, we consider the case where |t|<12. 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

limnn1(2t)2n+1=10+1=1,|t|<12.

Second, we consider the case where |t|>12. 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

limnn1(2t)2n+1=1++1=0,|t|>12.

Third, we consider the case where |t|=12. We may simply substitute in our equation

limnn1(2t)2n+1=limnn112n+1=11+1=12.

We see that it satisfies the definition of the pulse function

rect(t)=(t)=limnn1(2t)2n+1={0if |t|>12,12if |t|=12,1if |t|<12.

See also

[edit]