Rectangular function: Difference between revisions

Content deleted Content added
SdkbBot (talk | contribs)
m Removed erroneous space and general fixes (task 1)
replaced colon-indent wikitext with <math display=block> (:-indent generates invalid HTML5 <dd> without preceding <dt>); <math display=inline> for some taller inline equations to reduce height impact (by SublimeText.Mediawiker)
Line 7:
The '''rectangular function''' (also known as the '''rectangle function''', '''rect function''', '''Pi function''', '''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}(t) = \Pi(t) =
\left\{\begin{array}{rl}
0, & \text{if } |t| > \frac{1}{2} \\
Line 14:
\end{array}\right.</math>
 
Alternative definitions of the function define <math display=inline>\operatorname{rect}\left(\pm\frac{1}{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. However, this mid-point property, as defined here, is required (see e.g. Theorem 2, p.&nbsp;241 in <ref>{{Cite book |last=Kaplan |first=Wilfred |title=Operational Methods for Linear Systems |publisher=Addison-Wesley Pub. Co. |year=1962 }}</ref>) to be consistent with Fourier transform theory, otherwise the ''rect'' function is not the Fourier transform of [[Sinc function|''sinc'' function]].
 
==History==
Line 22:
The rectangular function is a special case of the more general [[boxcar function]]:
 
:<math display=block>\operatorname{rect}\left(\frac{t-X}{Y} \right) = u(t - (X - Y/2)) - u(t - (X + Y/2)) = u(t - X + Y/2) - u(t - X - Y/2)</math>
 
where <math>u</math> is the [[Heaviside function]]; the function is centered at <math>X</math> and has duration <math>Y</math>, from <math>X-Y/2</math> to <math>X+Y/2.</math>.
 
==Fourier transform of the rectangular function==
[[File:Sinc_function_(normalized).svg|thumb|400px|right|Plot of normalised <math>\mathrm{sinc}(x)</math> function (i.e. <math>\mathrm{sinc}(πx\pi x)</math>) with its spectral frequency components.]]
 
The [[Fourier transform#Tables of important Fourier transforms|unitary Fourier transforms]] of the rectangular function are<ref name="wolfram"/>
:<math display=block>\int_{-\infty}^\infty \mathrm{rect}(t)\cdot e^{-i 2\pi f t} \, dt
=\frac{\sin(\pi f)}{\pi f} = \mathrm{sinc}{(\pi f)},\,</math>
 
using ordinary frequency ''{{mvar|f''}}, and
 
:<math dislplay=block>\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty \mathrm{rect}(t)\cdot e^{-i \omega t} \, dt
=\frac{1}{\sqrt{2\pi}}\cdot \frac{\mathrm{sin}\left(\omega/2 \right)}{\omega/2}
=\frac{1}{\sqrt{2\pi}} \mathrm{sinc}\left(\omega/2 \right),\,
</math>
 
using angular frequency ω<math>\omega</math>, where [[sinc function|<math>\mathrm{sinc}</math>]] is the unnormalized form of the [[sinc function]].
[[File:Sinc_function_(normalized).svg|thumb|400px|right|Plot of normalised sinc(x) function (i.e. sinc(πx)) with its spectral frequency components.]]
using angular frequency ω, where [[sinc function|<math>\mathrm{sinc}</math>]] is the unnormalized form of the [[sinc function]].
 
Note that as long as the definition of the pulse function is only motivated by its behavior in the time-___domain experience, 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, as finiteness in time ___domain corresponds to an infinite frequency response. (Vice versa, a finite Fourier transform will correspond to infinite time ___domain response.)
Line 46 ⟶ 47:
We can define the [[triangular function]] as the [[convolution]] of two rectangular functions:
 
:<math display=block>\mathrm{tri} = \mathrm{rect} * \mathrm{rect}.\,</math>
 
==Use in probability==
{{Main |Uniform distribution (continuous)}}
Viewing the rectangular function as a [[probability density function]], it is a special case of the [[Uniform distribution (continuous)|continuous uniform distribution]] with <math>a = -1/2, b = 1/2.</math>. The [[characteristic function (probability theory)|characteristic function]] is
 
:<math display=block>\varphi(k) = \frac{\sin(k/2)}{k/2},</math>
 
and its [[moment-generating function]] is
 
:<math display=block>M(k) = \frac{\sinh(k/2)}{k/2},</math>
 
where <math>\sinh(t)</math> is the [[hyperbolic sine]] function.
Line 63 ⟶ 64:
The pulse function may also be expressed as a limit of a [[rational function]]:
 
:<math display=block>\Pi(t) = \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1}</math>
 
===Demonstration of validity===
First, we consider the case where <math display=inline>|t|<\frac{1}{2}.</math>. Notice that the term <math display=inline>(2t)^{2n}</math> is always positive for integer <math>n.</math>. However, <math>2t<1</math> and hence <math display=inline>(2t)^{2n}</math> approaches zero for large <math>n.</math>.
 
It follows that:
:<math display=block>\lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \frac{1}{0+1} = 1, |t|<\frac{1}{2}</math>
 
Second, we consider the case where <math display=inline>|t|>\frac{1}{2}.</math>. Notice that the term <math display=inline>(2t)^{2n}</math> is always positive for integer <math>n.</math>. However, <math>2t>1</math> and hence <math display=inline>(2t)^{2n}</math> grows very large for large <math>n.</math>.
 
It follows that:
:<math display=block>\lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \frac{1}{+\infty+1} = 0, |t|>\frac{1}{2}</math>
 
Third, we consider the case where <math display=inline>|t| = \frac{1}{2}.</math>. We may simply substitute in our equation:
 
:<math display=block>\lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{1^{2n}+1} = \frac{1}{1+1} = \frac{1}{2}</math>
 
We see that it satisfies the definition of the pulse function. Therefore,
 
:<math>\therefore display=block>\mathrm{rect}(t) = \Pi(t) = \lim_{n\rightarrow \infty, n\in \mathbb(Z)} \frac{1}{(2t)^{2n}+1} = \begin{cases}
0 & \mbox{if } |t| > \frac{1}{2} \\
\frac{1}{2} & \mbox{if } |t| = \frac{1}{2} \\