|
|
Line 1: |
Line 1: |
| [[Image:Rectangular function.svg|300px|thumb|right|Rectangular function]]
| | 35 yr old Gastroenterologist Carter Stoughton from Norwich, spends time with pastimes such as amateur radio, diet and woodworking. Is a travel enthusiast and recently made a journey to Gyeongju Historic Areas. |
| | |
| 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>\mathrm{rect}(t) = \Pi(t) = \begin{cases}
| |
| 0 & \mbox{if } |t| > \frac{1}{2} \\
| |
| \frac{1}{2} & \mbox{if } |t| = \frac{1}{2} \\
| |
| 1 & \mbox{if } |t| < \frac{1}{2}. \\
| |
| \end{cases}</math>
| |
| | |
| Alternative definitions of the function define <math>\mathrm{rect}(\pm \tfrac{1}{2})</math> to be 0,<ref>{{Cite book |last=Wang |first=Ruye |title=Introduction to Orthogonal Transforms: With Applications in Data Processing and Analysis |page=135-136 |publisher=Cambridge University Press |year=2012 |url=http://books.google.com/books?id=4KEKGjaiJn0C&pg=PA135 }}</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=http://books.google.com/books?id=gG-ybR3uIGsC&pg=PA85 }}</ref><ref>{{Cite book |last=Kumar |first=A. Anand |title=Signals and Systems |publisher=PHI Learning Pvt. Ltd. |page=258-260 |url=http://books.google.com/books?id=FGGa6BXhy3kC&pg=PA258 }}</ref> or undefined.
| |
| | |
| ==Relation to the boxcar function==
| |
| The rectangular function is a special case of the more general [[boxcar function]]:
| |
| | |
| :<math>\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 u is the [[Heaviside function]]; the function is centered at X and has duration Y, from X-Y/2 to X+Y/2.
| |
| | |
| Another example is this:
| |
| rect((t - (T/2)) / T ) goes from 0 to T, so in terms of Heaviside function u(t) - u((t-T) / T )
| |
| | |
| ==Fourier transform of the rectangular function==
| |
| The [[Fourier_transform#Tables_of_important_Fourier_transforms|unitary Fourier transforms]] of the rectangular function are<ref name="wolfram"/>
| |
| :<math>\int_{-\infty}^\infty \mathrm{rect}(t)\cdot e^{-i 2\pi f t} \, dt
| |
| =\frac{\sin(\pi f)}{\pi f} = \mathrm{sinc}(f),\,</math>
| |
| | |
| using ordinary frequency ''f'', and
| |
| | |
| :<math>\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\pi\right),\,
| |
| </math>
| |
| | |
| [[File:Sinc_function_(normalized).svg|thumb|200px|right|]]
| |
| using angular frequency ω, where [[sinc function|<math>\mathrm{sinc}</math>]] is the normalized form of the [[sinc function]].
| |
| | |
| Note that as long as the definition of the pulse function is only motivated by the time-domain experience of it, 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, such as the infinite bandwidth requirement incurred by the indefinitely-sharp edges in the time-domain definition.
| |
| | |
| ==Relation to the triangular function==
| |
| We can define the [[triangular function]] as the [[convolution]] of two rectangular functions:
| |
| | |
| :<math>\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,b=-\frac{1}{2},\frac{1}{2}</math>. The [[characteristic function (probability theory)|characteristic function]] is:
| |
| | |
| :<math>\varphi(k) = \frac{\sin(k/2)}{k/2},\,</math>
| |
| | |
| and its [[moment generating function]] is: | |
| | |
| :<math>M(k)=\frac{\mathrm{sinh}(k/2)}{k/2},\,</math>
| |
| | |
| where <math>\mathrm{sinh}(t)</math> is the [[hyperbolic sine]] function.
| |
| | |
| ==Rational approximation==
| |
| The pulse function may also be expressed as a limit of a [[rational function]]:
| |
| | |
| :<math>\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>|t|<\frac{1}{2}</math>. Notice that the term <math>(2t)^{2n}</math> is always positive for integer <math>n</math>. However, <math>2t<1</math> and hence <math>(2t)^{2n}</math> approaches zero for large <math>n</math>.
| |
| | |
| It follows that:
| |
| :<math>\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>|t|>\frac{1}{2}</math>. Notice that the term <math>(2t)^{2n}</math> is always positive for integer <math>n</math>. However, <math>2t>1</math> and hence <math>(2t)^{2n}</math> grows very large for large <math>n</math>.
| |
| | |
| It follows that:
| |
| :<math>\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>|t| = \frac{1}{2}</math>. We may simply substitute in our equation:
| |
| | |
| :<math>\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.
| |
| | |
| :<math>\therefore \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} \\
| |
| 1 & \mbox{if } |t| < \frac{1}{2}. \\
| |
| \end{cases}</math>
| |
| | |
| ==See also==
| |
| *[[Fourier transform]]
| |
| *[[Square wave]]
| |
| *[[Step function]]
| |
| | |
| ==References==
| |
| {{Reflist}}
| |
| | |
| {{DEFAULTSORT:Rectangular Function}}
| |
| [[Category:Special functions]]
| |
35 yr old Gastroenterologist Carter Stoughton from Norwich, spends time with pastimes such as amateur radio, diet and woodworking. Is a travel enthusiast and recently made a journey to Gyeongju Historic Areas.