Does there exist an analytic function $f$ on a domain containing the unit disk such that $f(z) = \exp(i\, \text{Im} z)$ on the unit circle? 
Does there exist an analytic function $f:D\rightarrow\mathbb C$, where $D$ is a domain containing the unit disk, such that $f(z) = e^{i \text{Im} z}$ on the unit circle $|z|=1$?

I'm supposed to rely on the fact that if $f: B_R=\left \{ |z|\leq R \right \}\rightarrow \mathbb C$ is analytic and even on $(-R,R)$ (so $f(x)=f(-x)$ when $x$ is real), then it is also even on $B_R$, outside the real number line. 
It seems that we need to show that $f$ isn't even on $B_1$  but is even on $(-1,1)$, which I cannot show. We only know how $f$ behaves on the unit circle!
 A: Nope. $$\oint_{|z|=1} e^{i\Im z} dz = i\int_0^{2\pi} e^{i(\sin\theta + \theta)} d\theta = -2\pi iJ_1(1) \ne 0$$
A: Sequence of hints:


*

*If $f$ and $g$ are two such functions, show they must be equal.

*If $f(z)$ is such a function, show that $g(z) = \overline{f(\bar z)}$ (its "reflection in the real axis") is another such function.

*If $f(z)$ is such a function, show that $f(x)$ is real-valued for all $x\in(-1,1)$.

*If $f(z)$ is such a function, show that $h(z) = \overline{f(-\bar z)}$ (its "reflection in the imaginary axis") is another such function.

*If $f(z)$ is such a function, show that $f(x)=f(-x)$ for all $x\in(-1,1)$.

A: Here is an answer which only uses your hint in spirit. Ideally you should think about Greg Martin's hints before reading this, since they are of a similar spirit.
You know that $f(z)$ satisfies the relation $f(z)f(1/z) = 1$ on the unit circle; because $g(z) = f(z)f(1/z) -1$ is a holomorphic function defined in a neighborhood of the circle, and it vanishes on a set with an accumulation point, it vanishes everywhere on that neighborhood. By the same logic $f(z) f(-z) = 1$ on the unit disc as well. 
In particular, the second formula implies $f(z)$ is nowhere everywhere along the unit disc. This allows us to use the first formula to give $f$ an extension to the entire complex plane; for $|z| > 1$, set $f(z) = 1/f(1/z)$. Because the RHS is already holomorphic, and this is true in the neighborhood of the unit circle, these patch together to gives us a formula for a globally defined extension of $f$ (which I will denote by the same name). 
Because $1/f$ is continuous and nonzero on the unit disc, we see that $1/f$ achieves a maximum, and hence that $f(1/z)$ achieves a maximum on $\Bbb C \setminus \Bbb D$. 
Combining these two maximums, we see that $|f|$ is bounded above. Thus $f$ is a bounded holomorphic function, and hence constant, contradicting your formula on the circle.
