{
  "id": "enwiki-001357987729",
  "slug": "rectangular-function",
  "title": "Rectangular function",
  "qid": "",
  "lead": "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{rect}\\left(\\frac{t}{T}\\right) = \\Pi\\left(\\frac{t}{T}\\right) = \\left\\{\\begin{array}{rl} 0, & \\text{if } |t| > \\frac{T}{2} \\\\ \\frac{1}{2}, & \\text{if } |t| = \\frac{T}{2} \\\\ 1, & \\text{if } |t| Alternative definitions of the function define \\operatorname{rect}\\left(t=\\pm\\frac{T}{2}\\right) to be 0, 1, or undefined. The area under the curve does not change for the different definitions of the functions at t=\\pm\\frac{T}{2} . The rectangular function can be used as the basis for a rectangular wave.",
  "body": "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{rect}\\left(\\frac{t}{T}\\right) = \\Pi\\left(\\frac{t}{T}\\right) = \\left\\{\\begin{array}{rl} 0, & \\text{if } |t| > \\frac{T}{2} \\\\ \\frac{1}{2}, & \\text{if } |t| = \\frac{T}{2} \\\\ 1, & \\text{if } |t| Alternative definitions of the function define \\operatorname{rect}\\left(t=\\pm\\frac{T}{2}\\right) to be 0, 1, or undefined. The area under the curve does not change for the different definitions of the functions at t=\\pm\\frac{T}{2} . The rectangular function can be used as the basis for 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: \\operatorname{rect}\\left(\\frac{t-X}{Y} \\right) = H(t - (X - Y/2)) - H(t - (X + Y/2)) = H(t - X + Y/2) - H(t - X - Y/2) where H(x) is the Heaviside step 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 \\operatorname{rect}(t)\\cdot e^{-i 2\\pi f t} \\, dt =\\frac{\\sin(\\pi f)}{\\pi f} = \\operatorname{sinc}(\\pi f) =\\operatorname{sinc}_\\pi(f), using ordinary frequency , where \\operatorname{sinc}_\\pi is the normalized form of the sinc function and \\frac{1}{\\sqrt{2\\pi}}\\int_{-\\infty}^\\infty \\operatorname{rect}(t)\\cdot e^{-i \\omega t} \\, dt =\\frac{1}{\\sqrt{2\\pi}}\\cdot \\frac{\\sin\\left(\\omega/2 \\right)}{\\omega/2} =\\frac{1}{\\sqrt{2\\pi}} \\cdot \\operatorname{sinc}\\left(\\omega/2 \\right), using angular frequency \\omega , where \\operatorname{sinc} is the unnormalized form of the sinc function. For \\operatorname{rect} (x/a) , its Fourier transform is \\int_{-\\infty}^\\infty \\operatorname{rect}\\left(\\frac{t}{a}\\right)\\cdot e^{-i 2\\pi f t} \\, dt ==Self convolution of the Rectangular function== splines that result from successive convolutions of the Rectangular function with itself.]] The self convolution of the dis-continuous rectangular function results in the triangular function, a piecewise defined spline that is continuous, but not continuously differentiable. Successive convolutions of the rectangular function result in piecewise defined pulses with lower maximums which are wider and smoother, with \"smoother\" meaning higher-order derivatives are continuous. A convolution of the discontinuous rectangular function with itself results in the triangular function, which is a continuous function: \\begin{align} \\operatorname{rect(2t/T)} * \\operatorname{rect(2t/T)} = \\operatorname{tri(t/T)} = \\begin{cases} 1 + t, & -T Self convolution of the rectangular function applied twice yields a continuous and differentiably continuous parabolic spline: \\begin{align} \\operatorname{rect(2t/T)} * \\operatorname{rect(2t/T)} * \\operatorname{rect(2t/T)} = \\operatorname{tri(t/T)} * \\operatorname{rect(2t/T)} = \\begin{cases} \\frac{9}{8} + \\frac{3}{2}t + \\frac{1}{2}t^2, & -\\frac{3}{2}T A self convolution of the rectangular function applied three times yields a continuous, and a second order differentiably continuous cubic spline: \\begin{align} \\operatorname{tri(t/T)} * \\operatorname{tri(t/T)} = \\begin{cases} \\frac{4}{3} + {2}t + t^2 +\\frac{1}{6}t^3 , & -2T A self convolution of the rectangular function applied four times yields a continuous, and a third order differentiably continuous 4th order spline: \\begin{align} 4^{th}\\,\\text{order spline} = \\begin{cases} \\frac{625}{384} + \\frac{125}{48}t + \\frac{25}{16}t^2 +\\frac{5}{12}t^3 + \\frac{1}{24}t^4, & -\\frac{5}{2}T Since the Fourier transform of the rectangular function is the Sinc function, the convolution theorem implies that the Fourier transform of pulses resulting from successive convolutions of the rectangular function with itself is simply the Sinc function to the order of the number of times that the convolution function was applied + 1 (i.e., the Fourier transform of the triangular function is Sinc 2 , the Fourier transform of the parabolic spline resulting from two successive convolutions of the rectangular function with itself is Sinc 3 , etc.) ==Use in probability== 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 \\varphi(k) = \\frac{\\sin(k/2)}{k/2}, and its moment-generating function is M(k) = \\frac{\\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: \\Pi(t) = \\lim_{n\\rightarrow \\infty, n\\in \\mathbb(Z)} \\frac{1}{(2t)^{2n}+1}. The rectangle function can be used to represent the Dirac delta function \\delta (x) . Specifically, \\delta (x) = \\lim_{a \\to 0} \\frac{1}{a}\\operatorname{rect}\\left(\\frac{x}{a}\\right). For a function g(x) , its average over the width a around 0 in the function domain is calculated as, g_{avg}(0) = \\frac{1}{a} \\int\\limits_{- \\infty}^{\\infty} dx\\ g(x) \\operatorname{rect}\\left(\\frac{x}{a}\\right). To obtain g(0) , the following limit is applied, g(0) = \\lim_{a \\to 0} \\frac{1}{a} \\int\\limits_{- \\infty}^{\\infty} dx\\ g(x) \\operatorname{rect}\\left(\\frac{x}{a}\\right) and this can be written in terms of the Dirac delta function as, g(0) = \\int\\limits_{- \\infty}^{\\infty} dx\\ g(x) \\delta (x). The Fourier transform of the Dirac delta function \\delta (t) is \\delta (f) = \\int_{-\\infty}^\\infty \\delta (t) \\cdot e^{-i 2\\pi f t} \\, dt = \\lim_{a \\to 0} \\frac{1}{a} \\int_{-\\infty}^\\infty \\operatorname{rect}\\left(\\frac{t}{a}\\right)\\cdot e^{-i 2\\pi f t} \\, dt \\delta (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== Fourier transform Square wave Step function Top-hat filter Boxcar function ==References==",
  "categories": [
    "22935437",
    "23603337",
    "26220375",
    "29176629",
    "68328988"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1357987729",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1780689353.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001357987729",
    "type": "webpage",
    "title": "Rectangular function",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/rectangular-function",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          11
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          11
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001357987729",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1357987729",
    "note": "Immutable snapshot enwiki-001357987729"
  }
}