Solution.
Replacing f with f−f(0) if necessary, we may assume without loss of generality that f(0)=0. Set g(z)=f(z)f(z). Notice that if we write f=u+iv, then f(z)=u(x,−y)−iv(x,−y). Thus,
∂x∂∂y∂∂x∂∂y∂u(x,−y)u(x,−y)(−v(x,−y))(−v(x,−y))=−∂x∂u(x,−y)=−∂y∂u(x,−y)=−∂x∂v(x,−y)=−∂y∂v(x,−y).
Since f is holomorphic, u and v satisfying the Cauchy-Riemann equations, and so
∂x∂u(x,−y)=∂x∂u(x,−y)=∂y∂v(x,−y)=∂y∂(−v(x,−y))∂y∂u(x,−y)=−∂y∂u(x,−y)=∂x∂v(x,−y)=−∂x∂(−v(x,−y)),
so f(z) satisfies the Cauchy-Riemann equations, hence holomorphic, and so g is holomorphic.
For x∈(−1,1), we have x=x and so g(x)=∣f(x)∣2∈R. Hence, we may view g:(−1,1)→R. For n∈N, we have g(x2n)=g(x2n+1) so by the mean value theorem, there exists yn∈(x2n+1,x2n) with g′(yn)=0. Since xn→0, we have yn→0, too. In other words, the zeroes of g′ have an accumulation point at the origin, so g′ is identically 0. Thus, g must be constant on D, since D is connected. Since f(0)=0, it follows that g(0)=0, so g is identically 0.
If f(z0)=0 for some z0∈D, then f(z0)=0 on a neighborhood U of z0. Thus, since f(z)f(z)=0 on U, it follows that f(z)=0 on U. But this implies that f(z) is 0 on the open set {z∣z∈U}, so f must be identically zero on all of D, a contradiction. Thus, f(z)≡0 to begin with, which completes the proof.