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 .

To see the factorization, expand ff in its Taylor series at aa. If ff is not identically zero, let mm be the first index with nonzero coefficient; factoring (za)m(z-a)^m leaves a holomorphic hh with h(a)0h(a)\ne0, so the zero is isolated. An accumulation point of zeros forces every Taylor coefficient there to vanish, hence fgf-g vanishes on a neighborhood. The zero set is then both open and closed in the connected domain, and therefore is all of DD.

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.