Understanding Reflection Principle proof The lecture notes that I am following has this proof of Schwarz Reflection Principle:
Scwarz Reflection Principle : Let $f$ be analytic in the domain $D$ that contains a segment $S$ of the $x$-axis and which is symmetric with respect to the $x$-axis. Then $\overline {f(z)} = f (\bar z)$ for all $z$ in the domain if and only if $f$ is real valued for each point on $S$.
Proof : Suppose that $f$ is real valued in $S$ and consider the
restriction $g$ of $f$ to the upper half plane. Then defining $\overline{g(z)} = g(\bar z)$ for all $z$ in the lower half plane that are symmetric to elements in the
(original) domain of $g$ defines a continuous function on $D$. Moreover, Integrals of $g$ over closed curves are zero: This is because the integral over every closed curve can be split into an integral in the upper half plane and an integral in the lower half plane. The integral in the upper half plane is zero by analyticity of $f$ . The integral in the lower half plane is zero because it is the complex conjugate of the integral of $f$ over the reflected curve. Thus, by Morera’s Theorem, $g$ is analytic.
Because $g$ is equal to $f$ in the upper half of the domain, it must be
equal to $f$ on $D$. But that means $\overline{f (z)} = f (\bar z)$ for all $z$ in the domain.
Other direction is obvious.

In the given proof, I can't understand why inegral in lower half plane is zero: afterall, there we have to deal with conjugate of an analytic function, which may not be analytic. Hence I am unable to apply Cauchy-Goursat theorem here.


The whole integral is being conjugated. If we think of it as a discrete sum:
$$ S=\sum g(z_i) d z_i$$
Then, after reflecting the curve, we evaluate the function at the reflected point and multiply it by reflected segment.
$$  \sum g( \overline{z_i}) d \overline{z_i} =  \sum \overline{g}(z_i) \overline{dz_i} = \overline{\sum g(z_i) dz_i}$$
In the last step, we are conjugating the summation as a whole, but what is the summation? That's zero because in the lmiting case $\sum g(z_i) dz_i \to \oint g(z) dz$ which is zero as it is analytic.
