Proof of non-constant analytic functions

Use the following theorem:

"A function that is analytic in a domain $D$ is uniquely determined over $D$ by its values in a domain, or along a line segment, contained in D"

to show that if $f(z)$ is analytic and non-constant throughout a domain $D$, then it cannot be constant throughout any neighborhood lying in $D$.

I am given the following suggestion: Suppose that $f(z)$ does have a constant value $w_0$ throughout some neighborhood in $D$.

My definition of analytic is: a function $f$ of a complex variable is said to be analytic at a point $z_0 \in C$ if f is differentiable in a neighborhood of $z_0$

I am in a complex analysis class. I have to prove this. I am thinking:

Assume that there exists an open set $U \subseteq D$ and $w_0 \in C$ such that $f(z)= w_0$ for all $z \in U$.

then by the theorem above $f(z)$ is not constant throughout since there exists a unique subset of D that is not constant.

Am I wording this okay? Is what I have written sufficient?

Did you already learn the identity theorem in you complex analysis course? If not, I can explain the proof if you ask. If you did learn the theorem already, this question is a direct application of it.

EDIT: Sorry, I misread your question. The theorem you are given at the beginning: "A function that is analytic in a domain $D$ is uniquely determined over $D$ by its values in a domain, or along a line segment, contained in $D$" is just a re-wording of the identity theorem. I use the wording of the theorem given on Wikipedia below because I find it to be clearer /EDIT

Assume by means of contradiction, that $f(z)=w_0$ is constant on some neighborhood in $D$.
Given two holomorphic functions $f$ and $g$ on a domain (open and connected set), if $f=g$ on some neighborhood in $D$ (non-empty open subset), then $f=g$ on all of $D$.
and using the functions $f$ and $g \equiv w_0$ (the constant function equal to $w_0$ which is trivially holomorphic), we must conclude that $f=g=w_0$ everywhere in $D$, and that $f$ is constant everywhere in $D$. This contradicts our assumption that $f$ was to be non-constant in $D$.
Therefore it cannot be true that $f$ is constant on any neighborhood in $D$.
• in my opinion, the intuitive formulation of the theorem at the beginning is : "$f-g = 0$ on a line segment or a non empty open $\subset D$" $\implies f = g$ on $D$ Jun 26, 2016 at 22:28