I'm studying for quals in Physics and was asked to calculate the Fourier Transform of a piecewise function:
$f(x) = 1$ when $\frac{\pi}{2}\le x\le \pi $ and $0$ otherwise
I set up the integral and solve
$$g(k) = \frac{1}{2\pi}\int_{\pi/2}^\pi e^{-ikx} dx$$
$$g(k) = \frac{1}{k\pi} \frac{e^{-ikx}}{2i} \mid_{\pi/2}^\pi$$
$$g(k) = \frac{1}{k\pi} \frac{e^{-ik\pi} - e^{-ik\pi/2}}{2i} $$
I'm fine with this as a solution, but when I look up the answer provided I find:
$$g(k) = \frac{\sin{(k\pi)} - \sin{(k\pi/2)}}{k\pi} $$
given how close the answer I calculate is to
$$\sin(\theta) =\frac{e^{-i\theta} - e^{i\theta}}{2i} $$ it's easy for me to believe that the two are equivalent, but I can't figure out how to get from my answer to the listed one.
I have two questions:
- Is my answer equivalent to the provided one?
- Assuming they are. What are the steps to transform from the form:
$$\frac{e^{-i\alpha} - e^{i\beta}}{2i}$$ to the form
$$\sin(\alpha) - \sin(\beta)$$