# Fourier transform of piecewise function

I am trying to calculate the Fourier transform of the following function: $$f(x)=\begin{cases}e^{-x}&|x|<1\\0&\text{otherwise}\end{cases}$$ What I have so far is: $$\hat{f}(\omega)=\int_{-\infty}^\infty f(x)e^{-j\omega x}dx=\int_{-1}^1e^{-x}e^{-j\omega x}dx=\int_{-1}^1e^{-(1+j\omega)x}dx$$ which I got as: $$(1-j\omega)\frac{e^{(1+j\omega)}-e^{-(1+j\omega)}}{1+\omega^2}$$ which I have tried to simplify to the following: $$2(1-j\omega)\frac{\sinh(1)\cos(\omega)+j\cosh(1)\sin(\omega)}{1+\omega^2}$$ which if I separate the real and imaginary parts left me with: $$\frac{2\left[\sinh1\cos\omega+\cosh1\,\omega\sin\omega\right]+2j\left[\cosh1\sin\omega-\sinh1\,\omega\cos\omega\right]}{1+\omega^2}$$ My question is am I missing an identity that makes this a lot easier or is this as simple as I can get it? Thanks

• This may help to solve step function problems even though it is not Fourier Series. Commented May 8, 2021 at 19:16
• IMHO the outcome can not be simplified any further. Commented May 9, 2021 at 11:08

$$\hat{f}(\omega)=\int_{-\infty}^\infty f(x)e^{-j\omega x}dx=\int_{-1}^1e^{-x}e^{-j\omega x}dx=\int_{-1}^1e^{-(1+j\omega)x}dx$$

Your above definition of Fourier Transform is valid if you are assuming non unitary angular frequecy $$\omega$$ but there are two other types of frequency, check their definitions also. But i will proceed with your definition and using $$j=\sqrt{-1}$$. Solving the exponential integral easily we get $$=-\left[\frac{e^{-x(1+j\omega)}}{1+j\omega}\right]_{-1}^{1}$$ $$=-\frac{1}{1+j\omega}\left[e^{-(1+j\omega)}-e^{(1+j\omega)}\right]$$ Using the property $$\sinh x=\frac{e^x-e^{-x}}{2}$$ we get $$=-\frac{1}{1+j\omega}\left[-2\sinh(1+j\omega)\right]$$ $$=\boxed{\color{blue}{\frac{2\sinh(1+j\omega)}{1+j\omega}}}$$

Edit : This is the best closed form in which we can express the answer, but if you wish to separate real and imaginary parts then you need to express in those long expressions as you did. Unfortunately there can't be simple closed forms for real and imaginary parts expressions here.

• This is nice but really I am looking for seperate real and imaginary parts Commented May 12, 2021 at 15:56
• i see, let me try again, thanks for sharing your concern Commented May 12, 2021 at 17:35
• i tried and i think there is no closed form of real and imaginary parts .. it has to be your expressions form but your expression has slight error, in denominator it should be $1+\omega^2$ Commented May 12, 2021 at 18:57

Here's one way to calculate the Fourier transform:

The distributional derivative of $$f$$ satisfies the equation $$f'(x)=-f(x)+e^{1}\delta(x+1)-e^{-1}\delta(x-1).$$

Taking the Fourier transform of both sides gives $$j\omega\hat f(\omega) = -\hat f(\omega)+e^{1}e^{j\omega}-e^{-1}e^{-j\omega}$$ i.e. $$\hat f(\omega) = \frac{e^{1+j\omega}-e^{-(1+j\omega)}}{1+j\omega}.$$

I don't think that the splitting into real and imaginary parts can be done in a simple way.