Equation in Complex plane I know that $\cos(\theta)=\frac{\exp(i\theta)+\exp(-i\theta)}{2}$ in which $\theta=arg(z)$ for some complex number $z$. Can I assume $\theta$ in above folmula as a comlex number? I mean, $$\cos(z)=\frac{\exp(iz)+\exp(-iz)}{2}$$ You know, I want to do $\cos(z)=2i$. Someone told me that I can, but $\theta$ is an angle and $z$ itself is a number and I can not understand this point!
Thanks

Yes, the formula
$$
\cos(z)=\frac{\exp(iz)+\exp(-iz)}{2}
$$
holds for all complex numbers $z$, including the real values $z = \theta$ that you first saw.  This follows from a uniqueness theorem for analytic continuations.  The so-called identity theorem states that if two holomorphic functions $f$ and $g$ agree on a set containing an accumulation point, then they must be identically equal.
In your case, we take $f$ to be the analytic continuation of (the real-valued function) $\cos(\theta)$, and $g(z) = \frac{\exp(iz)+\exp(-iz)}{2}$.  Your statement that
$$
\cos(\theta)=\frac{\exp(i\theta)+\exp(-i\theta)}{2}
$$
for $\theta \in \mathbb{R}$ means the functions $f$ and $g$ agree on $\mathbb{R}$.  Since $\mathbb{R}$ contains an accumulation point (indeed, every point of $\mathbb{R}$ is an accumulation point), then the theorem implies that $f$ and $g$ must be identically equal.  Since the functions are defined on all of $\mathbb{C}$, this means that
$$
\cos(z)=\frac{\exp(iz)+\exp(-iz)}{2}
$$
for all $z \in \mathbb{C}$.
