Give an function $f$ which is holomorphic in a sector $S$ and continuous but not holomorphic on $\bar{S}$ Can anyone give an function $f(z)$ such that $f$ is holomorphic in the sector $$S=\{z: -\frac{\pi}{4}<\arg z<\frac{\pi}{4}\}$$ that is continuous on the closure of $S$ but not holomorphic on the closure of $S$. thanks very much
 A: A simple example is $f(z)=\sqrt{z}$, or more generally, $f(z)=z^p$, $p>0$, and $p$ is not an integer.  
A: In fact, any region in $\mathbf{C}$ is a domain of holomorphy, a set where there is a holomorphic function that has no analytic continuation outside the set.  Let $R \subset \mathbf{C}.$ Choose a countable dense subset of $\partial R,$ enumerated as $r_0, r_1, \dotsc.$ Then, the sum
$$\sum_{i=0}^{\infty} 2^{-i} \frac{1}{z-r_i}$$
converges for all $z \in R.$ 
To show that, choose any $z \in R.$ Since $R$ is open, it contains an open disc around $z$, say of radius $\epsilon$. Then, the Weierstraß M-Test shows that the series is dominated by
$$\sum_{i=0}^{\infty} 2^{-i} \frac{2}{\epsilon} = \frac{4}{\epsilon}$$
in the open disc of radius $\frac{\epsilon}{2}$ around $z$, and so is uniformly convergent there and so holomorphic.  But because the series has poles in a dense subset of the boundary, it cannot be continued past it.
The classic example is the lacunary series
$$f(z) = \sum_{i=0}^{\infty} z^{2^i}.$$
Note that $f(z) = z + f(z^2).$ The series $f$ has a pole at $1$, so it has a pole at $-1$ by the formula, so it has a pole at $\pm i$, and so it has a pole at any $2^n$-th root of $1$.
The situation is different in higher dimensions.  In $\mathbf{C}^2$, it is easy to find sets where all functions can be continued; A polydisc is the Cartesian product of open discs in $\mathbf{C}.$ Take a polydisc, remove a strictly smaller one, and the Cauchy integral formula can be showed that any holomorphic function on the region can be continued to the removed polydisc.
