I everyone !
I have to show that with $r=\frac{p}{q}$ a rationnal number, an $k$ a natural number :
$\exp(i\times\pi\times 2^k \times r)$ is a $2q$-th root of unity.
What I did :
$\exp(i\times\pi\times 2^k \times r)=(e^{i\times\pi})^{2^k \times r}$ $=((e^{i\times\pi})^{2^k})^r$
I used the fact that $e^{i\times\pi}=-1$ and $2^k$ is even :
$((e^{i\times\pi})^{2^k})^r=((-1)^{2^k})^r$ $=1^r=1$
I know there is a mistake somewhere because for $r=\frac{1}{2}$ and $k=1$,
$\exp(i\times\pi\times 2^k \times r)=-1$
Can you help me to fix my issue please ?
Your mistake lies in assuming that $e^{ab}=(e^a)^b$. This is worst than wrong: it doesn't make sense in general (but it holds if $b\in\mathbb Z$).
You can prove what you wish to prove this way:\begin{align}\exp\left(i\pi2^k r\right)^{2q}&=\exp\left(i\pi 2^k\frac pq\times2q\right)\\&=\exp\left(i\pi 2^{k+1}p\right)\\&=1.\end{align}