# How is this integral computed??

I'm reading this book about electrical properties of materials where the electron is introduced as a wave. Using the equation of a wave, they bring about the "envelope" of a wave. So here is how the derivation goes: 1)Consider the equation of a wave traveling in one dimension: $$u = ae^{-i(\omega t - kz)}$$ where $$\omega = 2 \pi f$$ is the frequency, $$k$$ is the wave number, and $$a$$ is the amplitude. In addition to this information, the book refers to the phase velocity defined as: $${\partial z}/{\partial t} = {\omega}/{k}$$ 2)Instead of 1 single wave, let there be multiple waves that are superimposed such that $$u = \sum a_n e^{-i(\omega_n t - k_n z)}$$ 3)Consider the continuous case : $$u(z) = \int_{-\infty}^\infty a(k)e^{-i(\omega t - kz)}dk$$ 4)Make two more assumptions. First assumption: the waves are zero everywhere except at a small interval $$\Delta k$$ and here the amplitude is unity such at $$a(k)=1$$. This brings the equation to $$u(z) = \int_{k_0 - \Delta k /2}^{k_0 + \Delta k /2} e^{-i(\omega t - kz)}dk$$ 5)Suppose that $$t=0$$, thus yielding the endpoint: $$u(z) = \int_{k_0 - \Delta k /2}^{k_0 + \Delta k /2} e^{i kz}dk$$

When the integration is carried out, the result is $$u(z) = \Delta k e^{ik_0 z} \frac {\sin 1/2(\Delta kz)}{1/2(\Delta k z)}$$. My question is how is the integration done here? I do notice that u is a function of z and that the integrand integrates over the wave number k. Is there some change of variables going on here? By the way I only posses knowledge of ODEs and only know how to do basic Separation of variables for PDEs.

The antiderivative of $$e^{ikz}$$ with respect to $$k$$ is given by $$\frac{e^{ikz}}{iz}$$ for $$z \neq 0$$, so if we impose this condition on $$z$$, we have \begin{align}\int_{k_0 - \Delta k /2}^{k_0 + \Delta k /2} e^{i kz}dk &= \frac{1}{iz} \left[e^{i k z} \right]_{k_0 - \frac{\Delta k}{2}}^{k_0 + \frac{\Delta k}{2}} \\ &= \frac{1}{iz}e^{i k_0 z}\left(e^{i \frac{\Delta k}{2}} - e^{- i \frac{\Delta k}{2}} \right). \end{align}
Can you continue from here, perhaps using the fact that for any $$\theta \in \mathbb{R}$$, $$e^{i \theta} = \cos{\theta} + i \sin{\theta}$$?