Let $X$ be the Riemann surface of genus $g$ defined by $y^2=\prod_{i=1}^{2g+2}(x-e_i)$. Let $\pi:X\longrightarrow S$, be a degree two branched covering of the Riemann sphere $S$. Let $\pi(p_i)=e_i$, hence the ramification points are $p_1,\ldots, p_{2g+2}$.
I'm trying to show that the ramification divisor $R_\pi=p_1+\cdots+p_{2g+2}$ is linearly equivalent to the divisor $(2g+2).p_j$ for some fixed $j, 1\le j\le2g+2$.
I already know that $2.p_i\sim 2.p_j, \forall p_i$.
What about $f:X\longrightarrow S, f(x,y)=y/(x-e_j)^{g+1}=\frac{\sqrt{\prod_{i=1}^{2g+2}(x-e_i)}}{(x-e_j)^{g+1}}$ ? Is $f$ meromorphic on $X$? I'm confused whether $f$ is meromorphic or not because of the square root.
If $f$ is meromorphic then I can conclude that $div(f)=p_1+\cdots+p_{2g+2}-(2g+2).p_j$, and hence the linear equivalence $R_\pi=p_1+\cdots+p_{2g+2} \sim (2g+2).p_j$.