$f(z)=\int_C\frac {g(x)}{x-z}dx$ is holomorphic? Problem :
C is a smooth simple closed curve in $\mathbb C$
$g(x)$ is a continuous function on C
$f(z)=\int_C\frac {g(x)}{x-z}dx\quad (z\notin C)$
Show that $f(z)$ is holomorphic in $\mathbb C\setminus C$
My try :
$\lim_{h\to0}\frac{f(z+h)-f(z)}{h} =\lim_{h\to0}\int_C\frac{g(x)}{[x-(z+h)][x-z]}dx=\int_C\lim_{h\to0}\frac{g(x)}{[x-(z+h)][x-z]}dx=\int_C\frac{g(x)}{[x-z]^2}dx$ 
So $f(z)$ is holomorphic in $\mathbb C\setminus C$.
Is it right? I think I didn't use the fact that C is a smooth simple closed curve and $g(x)$ is continuous. 
And I'm not confident about the way I prove  $\lim_{h\to0}\int_C\frac{g(x)}{[x-(z+h)][x-z]}dx=\int_C\lim_{h\to0}\frac{g(x)}{[x-(z+h)][x-z]}dx$
I think the interchange of integral and limit is possible by uniformly convergence
$\sup_{x\in C}|\frac{g(x)}{[x-(z+h)][x-z]}-\frac{g(x)}{[x-z]^2}|=\sup |g(x)\frac{h}{[x-z]^2[x-(z+h)]}|\le|\frac{\max g(x)}{\min [x-z]^3}||h|$
. 
So it is uniformly convergent. (I think I used the fact $g(x)$ is continuous here around $\max g(x)$ but, still I think I didn't use the fact that C is a smooth simple closed curve.)
Is my proof correct? Thanks for your reading.
 A: The interchange of the limit and the integral is not justified, as you note,
so you need to try something else. The following is the usual wey to get round your problem, and consists of expanding the integral kernel $(z-\xi)^{-1}$ into 
a uniformly convergent powerseries, so that you can interchange summation and
integration: in general, it is much harder to prove one can interchange limits and integrals, but uniform convergence of series does the trick here.
Let $C$ be any piecewise smooth curve and define $f : \mathbb C\smallsetminus C\longrightarrow \mathbb C$ so that
$$ f(z)=\int_C\frac {g(\xi)}{\xi-z}d\xi$$
To show that $f$ is holomorphic, take a $z_0\in C$ and pick a ball $B = B(z_0,r)$ strictly missing $C$. I will show that $f$ admits a powerseries development in $B$, so that $f$ is analytic at $z_0$. Because $z_0$ is arbitrary, this shows $f$ is analytic and hence holomorphic throughout its domain.
For $z\in B$ and  $\xi \in C$ we have
$$\left|\frac{z-z_0}{\xi-z_0}\right|<1-\delta$$
for some $0 < \delta <1$. Thus we may consider the powerseries development
$$\frac{1}{z-\xi} =\frac{1}{\xi-z_0} \sum_{n\geqslant 0 } \left(\frac{z-z_0}{\xi-z_0}\right)^n $$
that is valid in $B$. This converges uniformly over $B$ by the estimate made above, and thus it is valid to interchange the order of integration and summation to obtain that for $z\in B$ we have
$$ f(z)=\sum_{n\geqslant 0} a_n (z-z_0)^n$$
where $a_n = \displaystyle \int_C \frac{g(\xi)}{(\xi-z_0)^{n+1}}d\xi$ for each $n\in \mathbb N$. 
