[Math] How to calculate Fourier transform on a linear discontinuous function

fourier transform

How to calculate Fourier transform on a linear discontinuous function, like the Haar scaling function $$f(t)=1 \text{ for } 0\leq t<1, \text{ and }0, \text{ otherwise }$$
Or, a similar problem of determining the Fourier transform of the function $f$ defined by $f(t) = 1$
if $0 < t \leq 1, $ and $ \:f(t) = -1$ if $-1 < t < 0$ and $f(t) = 0$ otherwise.

I have the solution for a similar function, though this is symmetric, it goes as follows:
$$f(t)=\begin{cases}t+\pi, \quad -\pi \leq t \leq 0,\\
\pi-t, \quad 0 <t \leq \pi,\\
0, \text{otherwise} \end{cases}$$
It has the fourier transform $$\hat{f}=\frac{2}{\sqrt{2\pi}} \int_{-\infty}^\infty f(t) \cos (\lambda t) dt=\frac{2}{\sqrt{2\pi}} \int_{0}^\infty (\pi-t) \cos (\lambda t) dt $$ this can be solved with integration by parts.

Question can I use the same method on the two first problem

Best Answer

You can just restrict the range of integration to the range of $t$ where $f(t)$ is non-zero. You can break the range at points of discontinuity. So for your second example $$\hat f(\lambda)=\frac 2{\sqrt {2 \pi}}\int_{-\infty}^\infty f(t)\cos(\lambda t)dt=\frac 2{\sqrt {2 \pi}}\left(\int_0^1\cos(\lambda t)dt-\int_{-1}^0\cos(\lambda t)dt\right)$$

Related Question