Computing the divisors of a meromorphic function defined by a hyperelliptic curve. 
Let $X$ be a hyperelliptic curve defined by $y^2=h(x).$ Let $\pi : X\to \mathbb{P}^1$ be the double covering map sending $(x,y)$ to $x$. Let $\omega=\pi^{*}(dx/h(x)).$ Compute div$(\omega)$.

I know that div$(\omega)=\sum_{p\in X} Ord_p(\omega)p$. I think I have to use the following lemma but not sure how to handle the hyperelliptic curve. 

Lemma 2.6. Suppose that $F : X —>Y$ is a holomorphic map between Riemann 
  surfaces, and $\omega$ is a meromorphic 1-form on $Y.$ Fix a point $p\in X.$ Then 
  $ord_p(F^{*}\omega) = (1 + ord_{F(p)}(\omega)) mult_p(F) - 1.$

Edit: The following is from the book "Algebraic curves and Riemann surfaces" by R.Miranda.

Hyperelliptic Riemann Surfaces:Let $h(x)$ be a polynomial of degree $2g+ 
1 + e,$ where $e$ is either 0 or 1, and assume that $h(x)$ has distinct roots. Form 
  the smooth affine plane curve $X$ by the equation $y^2 = h(x).$  

Note that any hyperelliptic surface $Z$ defined by $y^2 = h(x)$ has an automor- 
automorphism $\sigma : Z —> Z,$ namely $\sigma(x,y) = (x,-y).$ 
Note that $\sigma$ is an involution, that is, $\sigma\circ\sigma = id.$ This involution is called the hyperelliptic involution on X. It commutes with the projection map $\pi: X —> C_{\infty}$ in the sense that $\pi \circ \sigma=\pi.$
Meromorphic Functions on Hyperelliptic Riemann Surfaces: Using 
the hyperelliptic involution $\sigma$, we can describe all meromorphic functions on a 
hyperelliptic Riemann surface $X,$ defined by an equation $y^2 = h(x).$ 
For any meromorphic function $f$ on X, the pullback function $\sigma*f = f\circ \sigma$
also meromorphic on $X,$ since $\sigma$ is a holomorphic map. Since $\sigma^2= id,$ the sum 
$f+ \sigma^{*}f$is $\sigma^*$-invariant: $\sigma^*(f + \sigma^*f) = f + \sigma^*f. $
Now the basic example of a $\sigma^*$-invariant function is one which is pulled back 
from $\mathbb{C}_{\infty}$. This is a function $g$ of the form $g = \pi^*r = r\circ \pi$ for some meromorphic function $r$ on $\mathbb{C}_{\infty}.$ 
Any suggestions? Thanks. 
 A: The rational differential form $\omega$ on $X$ is just $dx/h(x)$ (but $x$ is viewed as a rational function on $X$). 
Suppose the ground field is algebraically closed and of characteristic $\ne 2$. 
At finite distance ($x\ne \infty$), at any point $p=(a,b)$, $x-a$ is a local parameter if $h(a)\ne 0$, in which case $\mathrm{ord}_p(\omega)=0$. If $h(a)=0$, then a parameter is $y$. As $h'(x)dx=2ydy$, we have $\mathrm{ord}_p(dx)=1$ and $\mathrm{ord}_p(h(x))=\mathrm{ord}_p(y^2)=2$. So $\mathrm{ord}_p(\omega)=-1$.
At $x=\infty$, first suppose $\deg h(x)=2g+2$ is even. Then $X\to\mathbb P^1$ is unramified above $x=\infty$, so $1/x$ is a parameter at the points $p_{\infty, 1}, p_{\infty, 2}$ above $\infty$, thus $dx$ has order $-2$ and $\omega$ has order $\deg h(x)-2=2g$ at $p_{\infty, i}$. 
If $\deg h(x)=2g+1$, then the parameter at the unique point $p_\infty$ above $x=\infty$ is $y/x^{g+1}$, $1/x$ has order $2$ and $d(1/x)$ has order $1$. Thus $dx=-(1/x)^{-2}d(1/x)$ has order $-3$ and $\omega$ has order $2\deg h(x)-3=4g-1$. 
In summary, let $p_1, \dots, p_{d}$ be the ramification points at finite distance ($d=\deg h(x)$), then 
$$\mathrm{div}(\omega)=-p_1-\cdots- p_{2g+2} + 2gp_{\infty,1}+2gp_{\infty,2}$$
if $\deg h(x)$ is even, and 
$$\mathrm{div}(\omega)=-p_1-\cdots- p_{2g+1} + (4g-1)p_{\infty}$$
otherwise. 
