# Can a complex function be holomorphic only on a proper closed subset of $\mathbb{C}$?

The following is the textbook definition of holomorphic functions:

Let $f:\mathbb{C}\to\mathbb{C}$ be a complex function and $U$ an open subset of $\mathbb{C}$. We say $f$ is holomorphic on $U$ if $f$ is differentiable at each point of $U$.

Here is my question:

Do we have an example of $f$ such that it is holomorphic on some proper closed subset $U\subset\mathbb{C}$ but not holomorphic on $\mathbb{C}\setminus U$?

If one only consider the real variable case, there is an example of a function which is differentiable at a single point, and discontinuous everywhere else: $$f= \begin{cases} x^2,&x\in\mathbb{Q}\\ -x^2,&x\not\in\mathbb{Q}. \end{cases}$$ But I don't know about the complex case.

• There is a very subtle distinction between a function being holomorphic and it being (complex) differentiable. Holomorphic is specifically meant for open sets so it does not make sense to ask about being holomorphic on a closed set; differentiability can occur on any kind of set. For such a function, consider $f(z) = |z|^2$. This is differentiable only at the origin. – Cameron Williams Jan 28 '16 at 3:42
• @CameronWilliams: That's a very good point. Would you bother writing the comment to an answer? – Jack Jan 28 '16 at 4:06

There is a very subtle distinction between a function being holomorphic and it being complex differentiable. Holomorphic is specifically meant for open sets so it does not make sense to ask about being holomorphic on a closed set; differentiability can occur on any kind of set.

For an example of a function that is complex differentiable on a (proper) closed set but not holomorphic anywhere on the complement, consider $f(z)=|z|^2$. This is differentiable only at the origin.

No.

A function $f$ is considered holomorphic on some set $U$ if and only if, for every point $u\in U$, $f$ is differentiable on some neighbourhood of $u$.

That means that there needs to be some "space" (in every direction) around $u$ for which $f$ is differentiable.

Closed sets have boundary points included, so if $U$ was closed, it would contain [boundary] points that have "space" around them not contained in $U$. So if $f$ was not differentiable on any point outside of $U$, then every neighbourhood of a boundary point would contain some points outside of $U$, i.e. points that $f$ is not differentiable on, i.e. there would be no neighbourhood of $u$ for which $f$ is differentiable on.

This means that $f$ cannot be holomorphic at every point in a closed set $U$ if $f$ is not differentiable on any point in the complement $U\setminus\mathbb{C}$.

In summary, a function $f$ can only be holomorphic on a set $U$ if there exists some superset $V: U\subseteq\mathbb{C}\setminus\overline{\mathbb{C}\setminus V}$ (i.e. $U\subseteq interior(V)$) that $f$ is differentiable on.

Sure. Let $U=\{0\}.$ For $z\in \mathbb C,$ define $f(z) = z^2\chi_{\mathbb Q\times \mathbb Q}(z).$ Then $f'(0) = 0,$ but $f'(z)$ fails to exist for all $z\in \mathbb C \setminus \{0\}.$

• Which means that the function is nowhere holomorphic. – N. S. May 11 '16 at 23:35
• Fine. But then your issue is with the OP, who opened the door to an expanded notion of "holomorphic" in the question. – zhw. May 11 '16 at 23:45