Function holomorphic except for real line and continuous everywhere is entire

Solution 1:

Use Cauchy's theorem combined with Morera's theorem. The integrals along any triangle contained in one of the open semiplanes is zero due to Cauchy. It remains to prove that the integrals along triangles that intersect the line are zero too.

Decomposing triangles into smaller triangles you can reduce to the case in which the triangle has an edge on the line. Now decompose this triangle into many many little triangles. All triangles that don't touch the line are zero. The ones that do touch are very little, so by continuity the integral on them is arbitrarily small. Take limit as the number of triangles growth and you are done.

[In the image imagine the big triangle to have constant size.] In the image imagine the big triangle with constant size.


The characterization of the sets that you can remove is more difficult. There is no good geometric characterization. But they can be characterized using the concept of analytic capacity (See the last section).