I have the following problem:
"Suppose f is an analytic function on a domain D that includes the real-axis and which is symmetric about the real-axis. Suppose also that when $x$ is real, $f(x)$ is purely imaginary. Then $f(\overline{z})=-\overline{f(z)}$."
My idea so far has been to define the piecewise function $g:D\rightarrow \mathbb{C}$ be:
$g(z)=f(z)$ if $z\in D^+\cup D\cap \mathbb{R}$ and $g(z)=-\overline{f(\overline{z})}$ if $z\in D^{-}$,
where $D^+=${$z\in D | Im(z)>0$} and $D^-=${$z\in D | Im(z)<0$}.
Where I'm stuck now is showing that the function $g$ is holomorphic on D. I would like to show $g$ is holomorphic on D because then, by the Identity Theorem, $f=g$ on all of $D$ and I get the result I want. Does anyone have any hints on how to begin showing that $g$ is holomorphic on D?