Show that $f$ admits an analytic primitive Let $\Omega$ be a convex domain and $ u: \Omega \to \mathbb R$ be a harmonic function.
Let $f:= \frac{\partial u}{\partial x} - i \frac{\partial u}{\partial y}$, show that f has an analytic primitive.
So my idea is to first prove f analytic. (Rather simple) and construct $F(z) = \int_{\gamma} f(\zeta)d\zeta$ where $\gamma$ denote a path from $z_0$ to $z$ in the convex domain.
Next I try to analyze $\frac{F(z+h)-F(z)}{h}$ to see whether it equals $F'(z)$.
Now,
1.
Is this a valid approach?


*I have an idea that $\int_{\gamma} f(\zeta)d\zeta = 0$  for any closed curve can grant us an analytic primitive, but I don't find a proof to it, it seems that the converse is a more celebrated result.

*(Edited) It seems that the result can be found in Theorem 16.21 in the following link
https://courses.maths.ox.ac.uk/node/view_material/46309


*A more direct approach is to find an analytic primitive for $\frac{\partial u}{\partial z}$, but I have no idea at this point.

 A: Yes, this is a valid approach. It corresponds with the line of reasoning I learned: $f$ is analytic $\implies$ the integral of $f$ around any triangle is $0$ $\implies$ $f$ has a primitive $\implies$ the integral around any closed curve is $0$.
The last implication is just an easy application of the fundamental theorem of calculus. The first implication is known as Goursat's theorem (or the Cauchy–Goursat theorem). The important implication is the middle one, which corresponds to your second question.
I assume you are familiar with either Goursat's theorem or the more powerful Cauchy's integral theorem, so we can assume that the first implication. To prove the second implication, we will construct a primitive similar to the one you mentioned. First pick an arbitrary point $z_0 \in \Omega$. Then we define
$$
F(z) = \int_{\gamma_z} f(w)dw,
$$
where $\gamma_z$ is the line segment between $z_0$ to $z$, which we know exists since $\Omega$ is convex. Next, we must show that the difference quotient
$$
\frac{F(z + h) - F(z)}{h}
$$
approaches $f(z)$ as $h$ gets small. The trick is a geometric one; if we draw out the integrals represented by $F(z + h)$ and $F(z)$ and apply Goursat's theorem, we see that $F(z + h) - F(z)$ is just the integral of the line segment connecting $z + h$ and $z$! The picture is below; the integral along the blue path is the same as the integral along the yellow path. I'll let you see if you can fill in the remaining details.
Edit: The $z - h$ in the image below should be $z$.

Side note: Ultimately, it is possible to show that any analytic function defined on a simply connected domain has a primitive. Goursat's theorem and the above result for convex sets (and in particular, discs) account for the first two steps of the proof. The last step is to show that if an analytic function has a primitive on discs, it must have a primitive on any simply connected domain.
A: Simplification of Line integral given in Question: 
Use $\gamma = z_0+t(z-z_0)$ and apply the definition of $F(z)=\int_{\gamma} f(\psi) d\psi $ 
$F(z) = (z-z_0)\int_{0}^1 f(z_0+t(z-z_0)) dt  = (z-z_0)\int_{0}^1 \frac{\partial u(z_0+t(z-z_0))}{\partial x}  dt -i (z-z_0)\int_{0}^1 \frac{\partial u(z_0+t(z-z_0))}{\partial y}  dt = $
$Re(z-z_0) \frac{\partial u(z_0+t(z-zz_0))}{\partial x} + Im(z-z_0) \frac{\partial u(z_0+t(z-z_0))}{\partial y} = \frac{d( u(z_0+t(z-z_0))}{dt}$
$Re(z-z_0) \int_0^1 \frac{\partial u(z_0+t(z-z_0))}{\partial x} dt + Im(z-z_0) \int_0^1 \frac{\partial u(z_0+t(z-z_0))}{\partial y} dt = u(z)-u(z_0)$
So $Re(F(z)) = u(z)-u(z_0)$
Now define $Im(F(z))$ so that its analytic and its derivative equals $f(z)$.
A proposal would be to try: $F(z)=(u(z)-u(z_0))- i (u(iz)-u(iz_0))$
where $u(a+ib)=u(a,b)$.
