Good evening everyone.
I wish to take the Fourier transform of the following piecewise function:
$$ f(x) = \begin{cases} \beta & \text{if } x < -\alpha \\ \frac{-\beta}{2\alpha} (x - \alpha) & \text{if } -\alpha < x < \alpha \\ 0 & \text{if } x > \alpha \end{cases} \quad (\alpha,\,\beta> 0) $$
I tried applying the definition:
$$ \begin{split} \hat{f}(\omega) & = \int_{\Bbb R} f(x) e^{-i\omega x}\,dx \\ & = \beta \int_{-\infty}^{-\alpha}e^{-i\omega x} \, dx + \frac{-\beta}{2\alpha} \int_{-\alpha}^{\alpha} (x - \alpha) e^{-i\omega x} \, dx \\ \end{split} \tag{1} $$
But clearly, this integral does not converge. On the other hand, I read that
$$ \hat{u}(\omega) = \frac{1}{i\omega} + \pi\delta(\omega) \tag{2}$$
where $u$ is the unit step function
$$ u(x) = \begin{cases} 0 & \text{if } x < 0 \\ 1 & \text{if } x > 0 \end{cases} $$
and $\delta$ is the Dirac delta function. I don't completely understand $(2)$ but I take it for granted.
Then, I wrote $f$ as a sum of unit step functions as follows:
$$ f(x) = \beta u(-x-\alpha) + \frac{-\beta}{2\alpha} (x - \alpha)(u(x+\alpha) - u(x-\alpha)) \tag{3}$$
I think I can use $(2)$ and the linearity of the Fourier transform and complete the calculation.
Is this a valid approach? Any references would be appreciated, thank you.
Edit: I have continued my calculation based on Jean Marie's answer (and dropped the $\beta$ term):
$$ \hat{f}(k)/\beta = \delta(k) + \frac{1}{2\alpha} \hat{r}(k) (-2i) \sin(2\pi\alpha k) $$
$$ = \delta(k) + \frac{1}{2\alpha} \left( \frac{i}{4\pi}\delta'(k)-\frac{1}{4\pi^2 k^2} \right) (-2i) \sin(2\pi\alpha k) $$
$$ = \delta(k) + \frac{1 - i\pi k^2\delta'(k)}{4\alpha\pi^2 k^2} \, i \sin(2\pi\alpha k) $$
Apply the identity $k^2\delta'(k)=0$
$$ = \delta(k) + \frac{1}{4\alpha\pi^2 k^2} \, i \sin(2\pi\alpha k) $$
Then use $\text{sinc}(x) = \sin(\pi x)/\pi x$
$$ = \delta(k) + \frac{1}{2\pi k} i \, \text{sinc}(2\alpha k) $$