Rectangular function

From testwiki
Revision as of 16:31, 27 February 2025 by 81.223.14.210 (talk) (Fourier transform of the rectangular function: Removed subjective paragraph that added nothing to the description)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:Redirect Template:Use American English

Rectangular function with a = 1

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]

rect(ta)=Π(ta)={0,if |t|>a212,if |t|=a21,if |t|<a2.

Alternative definitions of the function define rect(±12) to be 0,[3] 1,[4][5] or undefined.

Its periodic version is called a rectangular wave.

History

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.

Relation to the boxcar function

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

rect(tXY)=H(t(XY/2))H(t(X+Y/2))=H(tX+Y/2)H(tXY/2)

where H(x) is the Heaviside step function; the function is centered at X and has duration Y, from XY/2 to X+Y/2.

Fourier transform of the rectangular function

Plot of normalized sinc(x) function (i.e. sinc(πx)) with its spectral frequency components.

The unitary Fourier transforms of the rectangular function are[2] rect(t)ei2πftdt=sin(πf)πf=sincπ(f), using ordinary frequency Template:Mvar, where sincπ is the normalized form[10] of the sinc function and 12πrect(t)eiωtdt=12πsin(ω/2)ω/2=12πsinc(ω/2), using angular frequency ω, where sinc is the unnormalized form of the sinc function.

For rect(x/a), its Fourier transform isrect(ta)ei2πftdt=asin(πaf)πaf=a sincπ(af).

Relation to the triangular function

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

tri(t/T)=rect(2t/T)*rect(2t/T).

Use in probability

Template:Main Viewing the rectangular function as a probability density function, it is a special case of the continuous uniform distribution with a=1/2,b=1/2. The characteristic function is

φ(k)=sin(k/2)k/2,

and its moment-generating function is

M(k)=sinh(k/2)k/2,

where sinh(t) is the hyperbolic sine function.

Rational approximation

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

Π(t)=limn,n(Z)1(2t)2n+1.

Demonstration of validity

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: limn,n(Z)1(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: limn,n(Z)1(2t)2n+1=1++1=0,|t|>12.

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

limn,n(Z)1(2t)2n+1=limn,n(Z)112n+1=11+1=12.

We see that it satisfies the definition of the pulse function. Therefore,

rect(t)=Π(t)=limn,n(Z)1(2t)2n+1={0if |t|>1212if |t|=121if |t|<12.

Dirac delta function

The rectangle function can be used to represent the Dirac delta function δ(x).[11] Specifically,δ(x)=lima01arect(xa).For a function g(x), its average over the width a around 0 in the function domain is calculated as,

gavg(0)=1adx g(x)rect(xa). To obtain g(0), the following limit is applied,

g(0)=lima01adx g(x)rect(xa) and this can be written in terms of the Dirac delta function as, g(0)=dx g(x)δ(x).The Fourier transform of the Dirac delta function δ(t) is

δ(f)=δ(t)ei2πftdt=lima01arect(ta)ei2πftdt=lima0sinc(af). where the sinc function here is the normalized sinc function. Because the first zero of the sinc function is at f=1/a and a goes to infinity, the Fourier transform of δ(t) is

δ(f)=1, 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

References

Template:Reflist