Proving surjectivity of $\cos(z)$ and $\sin(z)$ and find all $z : \cos(z) \in \mathbb R$ and all $z: \sin(z) \in \mathbb R$ I am trying to solve the following two problems:
1) Prove that the functions $\cos(z)$, $\sin(z)$ are surjective over the complex numbers.
2) Find all $z \in \mathbb C$: $cos(z) \in \mathbb R$ and find all $z \in \mathbb C$: $\sin(z) \in \mathbb R$.
For 1),I've tried to prove it for the function $\cos(z)$ (I suppose the other one is analogue)  so I've used the fact that $\cos(z)=\dfrac{e^{iz}+e^{-iz}}{2}$.
Let $w \in \mathbb C$, I want to show there exists $z \in \mathbb C : f(z)=w$, i.e., $\dfrac{e^{iz}+e^{-iz}}{2}=w$, multiplying by $2$ and then by $e^{iz}$ yields $e^{2iz}+1=2we^{iz}$ iff $e^{2iz}-2we^{iz}+1=0$. 
I don't know if this approach is the correct one but here I've replaced $e^{iz}$ by $x$, so the solutions of the equation would be the roots of the polynomial $p(x)=x^2-2wx+1$, by the quadratic formula, I get that $x \in \{\dfrac{2w+w_0}{2},\dfrac{2w-w_0}{2}\}$, where $w_0^2=4w^2-4$.
Then, $e^{iz} \in \{\dfrac{2w+w_0}{2},\dfrac{2w-w_0}{2}\}$. At this point I got lost, I would like to explicitly show that $z$ exists and I can't see existence directly from the fact that $e^{iz}=\dfrac{2w+w_0}{2}$ or $e^{iz}=\dfrac{2w-w_0}{2}$.
First I thought of taking logarithm of both sides of the equation ir order to solve for $z$, but this is not a legitimate operation unless $e^{iz} \in \mathbb R$. 
I couldn't go any farther.
For point 2) I have no idea what to do, should I use the identity $\cos(z)=\dfrac{e^{iz}+e^{-iz}}{2}$?
I would appreciate some help with the two points (specially with point 2), at least in 1) I could do something). 
Btw, Happy new year!
 A: 1) Note that one of $\frac{2w+w_0}{2}, \frac{2w-w_0}{2}$ must be nonzero, and that $e^{iz}$ achieves all values except $0$, since for any $re^{i\theta}\in \Bbb C$ we have 
$re^{i\theta}=e^{i(\theta-i\ln r)}$
thus we have some $z$ such that $e^{iz}=\frac{2w+w_0}{2}$ or $e^{iz}=\frac{2w-w_0}{2}$.
2) If we write $z=x+iy$ then
$$\cos(z)=\frac{e^{ix-y}+e^{-ix+y}}{2}=\frac{e^{-y}e^{ix}+e^y\overline{e^{ix}}}{2}$$
which has conjugate
$$\frac{e^{-y}\overline{e^{ix}}+e^ye^{ix}}{2}$$
so $\cos(z)$ is real iff 
$$e^{-y}e^{ix}+e^y\overline{e^{ix}}=e^{-y}\overline{e^{ix}}+e^ye^{ix}.$$
If $e^{ix}$ is real then $x=n\pi$ for some $n\in\Bbb N$. Otherwise $e^{ix}$ and $\overline{e^{ix}}$ are linearly independent over $\mathbb R$, so $e^{-y}=e^y$ thus $y=0$.
The case of $\sin$ is similar for both problems.
A: The complex logarithm is indeed what you can do when you have $e^z$ and you want to get $z$. As you did, the quadratic equation always has at least one solution (repeated if $w \in \{1,-1\}$). Choosing any of them, we only have to "take logs" of $e^{iz} = a$ for some $a \ne 0$ which you have to check. Now $e^{x+yi} = e^x \cdot e^{iy}$ (length times angle) and so we can represent any non-zero complex number as $e^{x+yi}$ for some $(x,y)$ (possible values of $y$ repeating every $2\pi$). This also shows how to get the exact solution set.
Finally, $\sin$ can as you guessed be solved analagously but you can also use the identity involving $\sin$ and $\cos$ being "translations" of one another.
A: \begin{align}
\sin z & = w \\[10pt]
e^{iz} - e^{-iz} & = 2iw \\[10pt]
u - \frac 1 u & = 2iw \\[10pt]
u^2 - 1 & = 2uiw \\[10pt]
u^2 - 2iw u - 1 & = 0
\end{align}
This is the quadratic equation $au^2 + bu + c=0$ with $a=1,$ $b=-2iw,$ $c= - 1.$ It solutions are
$$
u = \frac{-b \pm \sqrt{b^2-4ac}}{2a} = \frac{2iw \pm \sqrt{-4w^2 + 4}} 2 = iw \pm \sqrt{1-w^2}.
$$
Once you have $u,$ you have $e^{iz} =u.$ There are infinitely many values of $z$ making this true. 
