I want to prove that if $ f_n $ are analytic functions on a domain $ U \subset \mathbb{C} $ and $ f_n $ tends locally uniformly to $ f $ on $U$, then $f$ is analytic on $U$.
My thoughts:
I'd like to show that $ f $ is necessarily continuous on $ U $, and that for any simple closed curve $ \gamma $, $ \int_\gamma f(z) dz = 0 $. Then by Morera's theorem, $f$ is analytic.
Now $f_n $ tends locally uniformly to $ f$ on $U$ means that for any $ x \in U $, $ \exists r > 0 $ such that $ f_n $ tends uniformly on $ B(x;r) $ to $f$. I know that continuity is preserved under uniform convergence, and so for any $ x \in U $, $ f$ is continuous on some ball around $x$, and so is continuous at $x$. Thus $ f $ is continuous on $ U $.
Let $ \gamma $ be a simple, closed curve in $ U $. Then for any $ x $ on $ \gamma $, $\exists $ $ r > 0 $ such that $ f_n $ converges uniformly to $f$ on $ B(x;r_x) $. Let $ N_x $ be the associated 'magic uniform convergence number' (for lack of a better term) for the sequence on this ball. Now, the collection of these balls for all $ x $ on $\gamma$ forms a cover of $\gamma$, and by compactness there is a finite subcover, say $ \{ B(x_i;r_i), 1 \leq i \leq n \} $. Let $ N = \max_i N_{x_i} $. Then $ N $ gives us uniform convergence of the sequence $ f_n $ to $ f$ on $\gamma$.
Thus we can say $ \int_\gamma f(z) dz = \lim_{n\to \infty} \int_\gamma f_n(z) dz = 0 $, and so we're done.
Is this proof valid?
Thanks!