Statement

Let DCD\subseteq\mathbb C be a and let f,g:DCf,g:D\to\mathbb C be holomorphic. If the set

{zD:f(z)=g(z)}\{z\in D:f(z)=g(z)\}

has an accumulation point in DD, then f=gf=g on all of DD.

Equivalent zero-set form

A nonzero holomorphic function on a domain has isolated zeros. Indeed, at any zero aa, its factors as

f(z)=(za)mh(z)f(z)=(z-a)^m h(z)

with m1m\ge1 and h(a)0h(a)\ne0. The integer mm is the .

Hypotheses matter

The accumulation point must lie inside the domain. For example, a sequence of zeros may accumulate at a boundary point without forcing the function to vanish. Connectedness is also essential: agreement on one component says nothing about another.

References
  1. John B. Conway, Functions of One Complex Variable I, 2nd ed., Springer, 1978. Publisher record. Relevant: Chapter III, §7.