Rectangle Function

DOWNLOAD Mathematica Notebook RectangleFunction

The rectangle function Pi(x) is a function that is 0 outside the interval [-1/2,1/2] and unity inside it. It is also called the gate function, pulse function, or window function, and is defined by

 Pi(x)={0   for |x|>1/2; 1/2   for |x|=1/2; 1   for |x|<1/2.
(1)

The left figure above plots the function as defined, while the right figure shows how it would appear if traced on an oscilloscope. The generalized function f(x)=hPi((x-c)/b) has height h, center c, and full-width b.

As noted by Bracewell (1965, p. 53), "It is almost never important to specify the values at x=+/-1/2, that is at the points of discontinuity. Likewise, it is not necessary or desirable to emphasize the values Pi(+/-1/2)=1/2 in graphs; it is preferable to show graphs which are reminiscent of high-quality oscillograms (which, of course, would never show extra brightening halfway up the discontinuity)."

The piecewise version of the rectangle function is implemented in the Wolfram Language as UnitBox[x], while the generalized function version is implemented as HeavisidePi[x].

Identities satisfied by the rectangle function include

Pi(x)=H(x+1/2)-H(x-1/2)
(2)
=H(1/2+x)+H(1/2-x)-1
(3)
=H(1/4-x^2)
(4)
=1/2[sgn(x+1/2)-sgn(x-1/2)],
(5)

where H(x) is the Heaviside step function. The Fourier transform of the rectangle function is given by

F_x[Pi(x)](k)=int_(-infty)^inftye^(-2piikx)Pi(x)dx
(6)
=sinc(pik),
(7)

where sinc(x) is the sinc function.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.