Rectangular function: Difference between revisions
imported>Natsuhata |
|||
| Line 2: | Line 2: | ||
{{Redirect|Box function|the Conway box function|Minkowski's question-mark function#Conway box function}} | {{Redirect|Box function|the Conway box function|Minkowski's question-mark function#Conway box function}} | ||
{{Use American English|date = March 2019}} | {{Use American English|date = March 2019}} | ||
[[Image:Rectangular function.svg|300px|thumb|right|Rectangular function with | [[Image:Rectangular function.svg|300px|thumb|right|Rectangular function with <math display="inline">T = 1</math>]] | ||
The '''rectangular function''' (also known as the '''rectangle function''', '''rect function''', '''Pi function''', '''Heaviside Pi function''',<ref>{{cite web |url=https://reference.wolfram.com/language/ref/HeavisidePi.html |title=HeavisidePi, Wolfram Language function |author=Wolfram Research |date=2008 |access-date=October 11, 2022}}</ref> '''gate function''', '''unit pulse''', or the '''normalized [[boxcar function]]''') is defined as<ref name="wolfram">{{MathWorld |title=Rectangle Function |id=RectangleFunction}}</ref> | The '''rectangular function''' (also known as the '''rectangle function''', '''rect function''', '''Pi function''', '''Heaviside Pi function''',<ref>{{cite web |url=https://reference.wolfram.com/language/ref/HeavisidePi.html |title=HeavisidePi, Wolfram Language function |author=Wolfram Research |date=2008 |access-date=October 11, 2022}}</ref> '''gate function''', '''unit pulse''', or the '''normalized [[boxcar function]]''') is defined as<ref name="wolfram">{{MathWorld |title=Rectangle Function |id=RectangleFunction}}</ref> | ||
<math display="block">\operatorname{rect}\left(\frac{t}{ | <math display="block">\operatorname{rect}\left(\frac{t}{T}\right) = \Pi\left(\frac{t}{T}\right) = | ||
\left\{\begin{array}{rl} | \left\{\begin{array}{rl} | ||
0, & \text{if } |t| > \frac{ | 0, & \text{if } |t| > \frac{T}{2} \\ | ||
\frac{1}{2}, & \text{if } |t| = \frac{ | \frac{1}{2}, & \text{if } |t| = \frac{T}{2} \\ | ||
1, & \text{if } |t| < \frac{ | 1, & \text{if } |t| < \frac{T}{2}. | ||
\end{array}\right.</math> | \end{array}\right.</math> | ||
Alternative definitions of the function define <math display="inline">\operatorname{rect}\left(\pm\frac{ | Alternative definitions of the function define <math display="inline">\operatorname{rect}\left(t=\pm\frac{T}{2}\right)</math> to be 0,<ref>{{Cite book |last=Wang |first=Ruye |title=Introduction to Orthogonal Transforms: With Applications in Data Processing and Analysis |pages=135–136 |publisher=Cambridge University Press |year=2012 |url=https://books.google.com/books?id=4KEKGjaiJn0C&pg=PA135 |isbn=9780521516884 }}</ref> 1,<ref>{{Cite book |last=Tang |first=K. T. |title=Mathematical Methods for Engineers and Scientists: Fourier analysis, partial differential equations and variational models |page=85 |publisher=Springer |year=2007 |url=https://books.google.com/books?id=gG-ybR3uIGsC&pg=PA85 |isbn=9783540446958 }}</ref><ref>{{Cite book |last=Kumar |first=A. Anand |title=Signals and Systems |publisher=PHI Learning Pvt. Ltd. |pages=258–260 |url=https://books.google.com/books?id=FGGa6BXhy3kC&pg=PA258 |isbn=9788120343108 |year=2011 }}</ref> or undefined. The area under the curve does not change for the different definitions of the functions at <math display="inline">t=\pm\frac{T}{2}</math>. | ||
The rectangular function can be used as the basis for a ''[[rectangular wave]]''. | |||
==History== | ==History== | ||
| Line 42: | Line 42: | ||
=a \frac{\sin(\pi af)}{\pi af} = a\ \operatorname{sinc}_\pi{(a f)}.</math> | =a \frac{\sin(\pi af)}{\pi af} = a\ \operatorname{sinc}_\pi{(a f)}.</math> | ||
== | ==Self convolution of the Rectangular function== | ||
[[File:Splines resulting from successive convolution of the unit Rect function.png|thumb|The unit Rectangular function (in which <math display="inline">T=1</math>) along with the [[Piecewise function|piecewise defined]] [[spline (mathematics)|splines]] that result from successive convolutions of the Rectangular function with itself.]] | |||
The [[self convolution]] of the dis-[[Continuous function|continuous]] rectangular function results in the [[triangular function]], a [[Piecewise function|piecewise defined]] [[spline (mathematics)|spline]] that is continuous, but not continuously [[Differentiable function|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 derivative]]s are continuous.<ref>{{cite web|url=https://cyclostationary.blog/2021/01/28/sptk-convolution-and-the-convolution-theorem/|title=SPTK: Convolution and the Convolution Theorem| first= Chad |last= Spooner| date= January 28, 2021}}</ref> | |||
<math display=block>\operatorname{tri(t/T)} = \operatorname{rect(2t/T)} * \operatorname{rect(2t/T)} | A [[convolution]] of the discontinuous rectangular function with itself results in the triangular function, which is a continuous function: | ||
<math display=block> \begin{align} \operatorname{rect(2t/T)} * \operatorname{rect(2t/T)} = \operatorname{tri(t/T)} = | |||
\begin{cases} | |||
1 + t, & -T < t < 0 \\ | |||
1 - t, & \,\,\,\,\, 0 < t < T \\ | |||
0 & \,\,\,\,\,\text{otherwise} \\ | |||
\end{cases} | |||
\end{align} | |||
</math> | |||
Self convolution of the rectangular function applied twice yields a continuous and differentiably continuous parabolic spline: | |||
<math display=block> \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 < t < -\frac{1}{2}T \\ | |||
\frac{3}{4} - t^2, & -\frac{1}{2}T < t < \frac{1}{2}T \\ | |||
\frac{9}{8} - \frac{3}{2}t + \frac{1}{2}t^2, & \,\,\,\,\, \frac{1}{2}T < t < \frac{3}{2}T \\ | |||
0 & \,\,\,\,\,\text{otherwise} \\ | |||
\end{cases} | |||
\end{align} | |||
</math> | |||
A self convolution of the rectangular function applied three times yields a continuous, and a second order differentiably continuous cubic spline: | |||
<math display=block> \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 < t < -T \\ | |||
\frac{2}{3} - t^2 - \frac{1}{2}t^3, & -T < t < 0 \\ | |||
\frac{2}{3} - t^2 + \frac{1}{2}t^3, & \,\,\,\,\,0 < t < T \\ | |||
\frac{4}{3} - {2}t + t^2 -\frac{1}{6}t^3 , & \,\,\,\,\,T < t < 2T \\ | |||
0 & \,\,\,\,\,\text{otherwise} \\ | |||
\end{cases} | |||
\end{align} | |||
</math> | |||
A self convolution of the rectangular function applied four times yields a continuous, and a third order differentiably continuous 4th order spline: | |||
<math display=block> \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 < t < -\frac{3}{2}T \\ | |||
\frac{55}{96} - \frac{5}{24}t - \frac{5}{4} t^2 - \frac{5}{6}t^3 -\frac{1}{6}t^4, & -\frac{3}{2}T < t < -\frac{1}{2}T \\ | |||
\frac{115}{192} - \frac{5}{8}t^2 + \frac{1}{4}t^4, & -\frac{1}{2}T < t < \frac{1}{2}T \\ | |||
\frac{55}{96} + \frac{5}{24}t - \frac{5}{4} t^2 + \frac{5}{6}t^3 -\frac{1}{6}t^4, & \,\,\,\,\,\frac{1}{2}T < t < \frac{3}{2}T \\ | |||
\frac{625}{384} - \frac{125}{48}t + \frac{25}{16}t^2 -\frac{5}{12}t^3 + \frac{1}{24}t^4, & \,\,\,\,\,\frac{3}{2}T < t < \frac{5}{2}T \\ | |||
0 & \,\,\,\,\,\text{otherwise} \\ | |||
\end{cases} | |||
\end{align} | |||
</math> | |||
Since the [[Fourier Transform]] of the Rectangular function is the [[Sinc function]], the [[Convolution theorem]] mean that the Fourier transform of pulses resulting from successive convolution 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<sup>2</sup>, the Fourier transform of parabolic spline resulting from two successive convolutions of the Rectangular function with itself is Sinc<sup>3</sup>, etc.) | |||
==Use in probability== | ==Use in probability== | ||
Latest revision as of 12:47, 27 December 2025
Template:Short description Script error: No such module "redirect hatnote". Template:Use American English
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]
Alternative definitions of the function define to be 0,[3] 1,[4][5] or undefined. The area under the curve does not change for the different definitions of the functions at .
The rectangular function can be used as the basis for a rectangular wave.
History
The rect function has been introduced 1953 by Woodward[6] in "Probability and Information Theory, with Applications to Radar"[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:
where is the Heaviside step function; the function is centered at and has duration , from to
Fourier transform of the rectangular function
The unitary Fourier transforms of the rectangular function are[2] using ordinary frequency Template:Mvar, where is the normalized form[10] of the sinc function and using angular frequency , where is the unnormalized form of the sinc function.
For , its Fourier transform is
Self convolution of the Rectangular function
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.[11]
A convolution of the discontinuous rectangular function with itself results in the triangular function, which is a continuous function:
Self convolution of the rectangular function applied twice yields a continuous and differentiably continuous parabolic spline:
A self convolution of the rectangular function applied three times yields a continuous, and a second order differentiably continuous cubic spline:
A self convolution of the rectangular function applied four times yields a continuous, and a third order differentiably continuous 4th order spline:
Since the Fourier Transform of the Rectangular function is the Sinc function, the Convolution theorem mean that the Fourier transform of pulses resulting from successive convolution 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 Sinc2, the Fourier transform of parabolic spline resulting from two successive convolutions of the Rectangular function with itself is Sinc3, etc.)
Use in probability
Script error: No such module "Labelled list hatnote". Viewing the rectangular function as a probability density function, it is a special case of the continuous uniform distribution with The characteristic function is
and its moment-generating function is
where is the hyperbolic sine function.
Rational approximation
The pulse function may also be expressed as a limit of a rational function:
Demonstration of validity
First, we consider the case where Notice that the term is always positive for integer However, and hence approaches zero for large
It follows that:
Second, we consider the case where Notice that the term is always positive for integer However, and hence grows very large for large
It follows that:
Third, we consider the case where We may simply substitute in our equation:
We see that it satisfies the definition of the pulse function. Therefore,
Dirac delta function
The rectangle function can be used to represent the Dirac delta function .[12] Specifically,For a function , its average over the width around 0 in the function domain is calculated as,
To obtain , the following limit is applied,
and this can be written in terms of the Dirac delta function as, The Fourier transform of the Dirac delta function is
where the sinc function here is the normalized sinc function. Because the first zero of the sinc function is at and goes to infinity, the Fourier transform of is
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
<templatestyles src="Reflist/styles.css" />
- ↑ Script error: No such module "citation/CS1".
- ↑ a b Script error: No such module "Template wrapper".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "Citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Wolfram MathWorld, https://mathworld.wolfram.com/SincFunction.html
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
Script error: No such module "Check for unknown parameters".