Differentials on hyperelliptic curves The following is an exercise of Vakil's Foundations of Algebraic Geometry. We consider a hyperelliptic curve $C$ of genus $g$ over an algebraically closed field $k$ of characteristic not $2$. Associated to $C$ is a double cover $\pi \colon C \to \mathbb{P}^1$ of the projective line. This cover has $2g + 2$ ramification points $p_1,\ldots,p_{2g + 2}$ which we may assume to lie on an affine open cover $U = \operatorname{Spec} k[x]$ of $\mathbb{P}^1$.
I am asked to compute the zeros and poles of $\pi^* dx$. I do not know how to proceed. From what I understand, we can think of $C \times_{\mathbb{P}^1} U$ as $\operatorname{Spec} k[x,y] / \big(y^2 - (x - p_1) \cdots (x - p_{2g+2})\big)$, and so on this space we may understand $\Omega^1$ as being the module generated by $dx$ and $dy$ satisfying the relationship
$$2y \,dy = \bigg(\frac{d}{dx}(x-p_1)\cdots(x-p_{2g+2})\bigg)\,dx,$$
and I presume that the $dx$ in this module corresponds to the $\pi^* dx$ we are interested in. But then what? I'm not sure I even know what it means for $\pi^* dx$ to have a zero or a pole anywhere, or how this can be seen from the formula above.
 A: Let $f(x) = \prod_{i=1}^{2g+2} (x - p_i)$ so $C: y^2 = f(x)$. First some intuition: if we set $y=0$ in your equation
\begin{equation}
\label{deriv}
2y \,dy = f'(x) \,dx, \tag{$*$}
\end{equation}
we get $dx = 0$, so the points on $C$ where $y = 0$, namely $(p_1, 0), \ldots, (p_{2g+2},0)$, should be zeroes of $dx$. You might worry that $f'(p_i)$ could be $0$, but this can't happen since $C$ is nonsingular. (See example 21.2.7 (p. 564) in Vakil for an explicit example.)
More formally, the module of differentials $\Omega_{C/k}$ is locally free of rank $1$, so there is an open cover $\{U_i\}_i$ of $C$ such that $\DeclareMathOperator{\O}{\mathscr{O}}\Omega_{C/k}|_{U_i} \cong \O_C|_{U_i}$ for each $i$. A section $s$ of $\Omega_{C/k}$ has a zero or pole at a point $P \in U_i$ exactly when the corresponding function $f_i := \Phi_i(s) \in \O_C(U_i)$ does, where $\Phi_i$ is the isomorphism $\Omega_{C/k}|_{U_i} \overset{\sim}{\to} \O_C|_{U_i}$. (This is true for sections of line bundles in general: to check if a section has a zero at a point, we trivialize the line bundle and then check if the corresponding function does. For another example of computing the zeroes and poles of a section of a line bundle, see this post.)
Since the curve is nonsingular, the distinguished affine opens $D(y)$ and $D(f'(x))$ cover $C$. The equation $(\ref{deriv})$ will allow us to trivialize $\Omega_{C/k}$ over both of these sets. On $D(y)$ we have
$$
dy = \frac{f'(x)}{2y} dx
$$
so $\Omega_{C/k}(D(y))$ is generated by $dx$ and we have the isomorphism
\begin{align*}
\Omega_{C/k}(D(y)) &\overset{\sim}{\to} \O_C(D(y))\\
dx &\mapsto 1\\
dy &\mapsto \frac{f'(x)}{2y} \, .
\end{align*}
The constant function $1$ has no zeroes or poles, so neither does $dx$ on this patch. On $D(f'(x))$ we instead have
$$
dx = \frac{2y}{f'(x)} dy
$$
so $dy$ is a generator on this patch and we have the isomorphism
\begin{align*}
\Omega_{C/k}(D(f'(x))) &\overset{\sim}{\to} \O_C(D(f'(x)))\\
dy &\mapsto 1\\
dx &\mapsto \frac{2y}{f'(x)} \, .
\end{align*}
The function $\frac{2y}{f'(x)}$ has zeroes on $D(f'(x))$ where $y = 0$, which are exactly the Weierstrass points $(p_1, 0), \ldots, (p_{2g+2},0)$.
We've been working in an affine patch, so now we have to check for zeroes and poles on the line at infinity. Here the curve is given in an affine patch by
$$
v^2 = u^{2g+2} f(1/u) = \prod_{i=1}^{2g+2} (1 - p_i u)
$$
where $u = 1/x$ and $v = y/x^{g+1}$. (This can be seen by considering $C$ embedded in the weighted projective space $\mathbb{P}(1,g+1,1)$.) You can try computing the zeroes and poles of $dx$ on this patch and I'll put my computation below.

 Let $\hat{f}(u) = \prod_{i=1}^{2g+2} (1 - p_i u)$ so the curve is given by $v^2 = \hat{f}(u)$. The only points of $C$ on the line at infinity are $(u,v) = (0,1)$ and $(0,-1)$ so we just have to check these two points. These points both lie in the affine open $D(v)$ and differentiating our equation, we have $$2v dv = \hat{f}'(u) du \implies dv = \frac{\hat{f}'(u)}{2v} du$$ so $du$ is a generator for $\Omega_{C/K}$ on this patch. Since $dx = d(1/u) = -\frac{1}{u^2} du$, then $dx$ has a double pole at both $(0,1)$ and $(0,-1)$.

