I am given the following function:
$$f : \mathbb{R} \rightarrow \mathbb{C} ^ * \hspace{2cm} f(x) = \cos(2 x \pi) + i \sin(2 x \pi)$$
and I have to find $x \in \mathbb{R}$ such that $f(x)$ is a $4$th root of unity.
This is what I did:
$$( f(x) ) ^ 4 = 1 \Rightarrow f(x) = \pm 1$$
Case number $1$:
$$f(x) = 1$$
$$\cos(2x\pi) + i\sin(2x\pi) = 1$$
Now matching the real part from the left-hand side with the real part from the right hand side and the imaginary part from the left-hand with the imaginary part from the right-hand side we get:
$$\hspace{5cm} \cos(2x\pi) = 1 \hspace{5cm} (1)$$
$$\hspace{5cm} \sin(2x\pi) = 0 \hspace{5cm} (2)$$
Solving $(1)$ I got:
$$x = k, \hspace{.25 cm} k \in \mathbb{Z}$$
Solving $(2)$ I got:
$$x = \dfrac{k}{2}, \hspace{.25 cm} k \in \mathbb{Z}$$
Intersecting these two I got that:
$$\hspace{5cm} x \in \{ k \hspace{.1cm} | \hspace{.1cm} k\in \mathbb{Z}\} \hspace{5cm} (*)$$
Case number $2$:
$$f(x) = -1$$
$$\cos(2x\pi) + i\sin(2x\pi) = -1$$
Acting in a similar manner as we did in Case $1$, we get that:
$$\hspace{5cm} \cos(2x\pi) = -1 \hspace{5cm} (3)$$
$$\hspace{5.3cm} \sin(2x\pi) = 0 \hspace{5.2cm} (4)$$
Solving $(3)$ I got:
$$x = \dfrac{2k + 1}{2}, k \in \mathbb{Z}$$
Solving $(4)$ I got:
$$x = \dfrac{k}{2}, k \in \mathbb{Z}$$
Intersecting these two I got:
$$\hspace{5cm} x \in \bigg \{ \dfrac{2k + 1}{2} \hspace{.1cm} | \hspace{.1cm} k \in \mathbb{Z} \bigg\} \hspace{5cm} (**)$$
Now taking the unity of the two intervals at $(*)$ and at $(**)$ we get that the equation $( f(x) ) ^ 4 = 1$ has solutions if
$$x \in \{ k \hspace{.1cm} | \hspace{.1cm} k \in \mathbb{Z} \} \hspace{.1cm} \cup \hspace{.1cm} \bigg \{ \dfrac{2k + 1}{2} \hspace{.1cm} | \hspace{.1cm} k \in \mathbb{Z} \bigg \} $$
So that's that. The problem is that the solution given from the source of this exercise is actually:
$$x \in \bigg \{ \dfrac{k}{4} \hspace{.1cm} | \hspace{.1cm} k \in \mathbb{Z} \bigg \}$$
So what did I do wrong?
You also need to consider the cases $f(x) = i$ and $f(x) = -i$.
Also note that $f(x) = e^{2\pi i x}$ so $f(x)^4 =e^{8\pi i x} $ so you want $8\pi x = 2k\pi $ or $x = \frac{k}{4}$.