<s>[INST] Relationship between e and sine I am reading a physics text about scattering but I am stuck with the maths.
I think the solution might be related to Euler's formula where:
$$\frac{e^{i\theta} - e^{-i\theta} }{2i} = \sin\theta$$
The text says that:
$$I(Q) = \bigg|\sum_{n=0}^{N-1}b e^{ikna\sin\theta}\bigg|^2$$
and
$$\sum_{n=0}^{N-1} u^{n} = \frac{1-u^N}{1-u}$$
where $u = e^{ika\sin\theta}$  and they say that this means:
$$I(Q) = b^2\frac{\sin^2(\tfrac12kNa\sin\theta)}{\sin^2(\tfrac12ka\sin\theta)}$$
Can someone show this?
Thanks
 [/INST] So first, we have the identities
$$|x+iy|^2 = x^2 + y^2 \text{ for } x,y\in\mathbb{R}$$
$$\left|\frac{x}{y}\right| = \frac{|x|}{|y|}$$
$$1-\cos(x) = 2\sin^2(x/2)$$
$$\cos^2(x) + \sin^2(x) = 1$$
$$\sum_{j=0}^{N-1} r^j = \frac{1-r^N}{1-r}$$
Also for any $x$,
$$
\begin{align*}
\left|1-e^{ix}\right| &= |1-\cos(x)-i\sin(x)|^2 \\
&= (1-\cos(x))^2 + \sin^2(x) \\
&= 1 - 2\cos(x) + \cos^2(x) + \sin^2(x) \\
&= 2 - 2\cos(x) \\
&= 4\sin^2(x/2)
\end{align*}
$$
Let $\phi = ka\sin(\theta)$
Then
$$
\begin{align*}
I &= b^2\left|\sum_{n=0}^{N-1} e^{i\phi n}\right|^2 \\
&= b^2\left|\frac{1-e^{i\phi N}}{1-e^{i\phi}}\right| \\
&= b^2 \frac{|1-e^{i\phi N}|}{|1-e^{i\phi}|} \\
&= b^2 \frac{\sin^2(N\phi/2)}{\sin^2(\phi/2)} \\
&= b^2 \frac{\sin^2(\frac{1}{2}Nka\sin(\theta))}{\sin^2(\frac{1}{2}ka\sin(\theta))}
\end{align*}
$$
</s>