(Silverman's The Arithmetic of Elliptic Curves Exercise 2.14) For this exercise we assume that char K $\neq 2$. Let $f(x)\in K[x]$ be a polynomial of degree $d\geq 1$ with nonzero discriminant, let $C_0/K$ be the affine curve given by the equation $$C_0 : y^2=f(x)=a_0x^d+a_1x^{d-1}+\dots+a_{d-1}x+a_d$$ and let $g$ be the unique integer satisfying $d-3<2g\leq d-1$.
(a) Let $C$ be the closure of the image of $C_0$ via the map $$ [1,x,x^2,\dots,x^{g-1},y] : C_0\to \mathbb{P}^{g+2}$$ Prove that $C$ is smooth and that $C\cap \{X_0\neq 0\}$ is isomorphic to $C_0$. The curve $C$ is called a hyperelliptic curve.
I have already proved this part by I wanted to provide it since (b) does refer to it.
(b) Let $$ f^*(v)=v^{2g+2}f(1/v)= \begin{cases} a_0+a_1v+\dots+a_{d-1}v^{d-1}+a_dv^d & \text{ if $d$ is even} \\ a_0v+a_1v^2+\dots+a_{d-1}v^{d}+a_dv^{d+1} & \text{ if $d$ is odd} \end{cases} $$ Show that $C$ consists of two affine pieces $$ C_0 : y^2=f(x) \hspace{1cm} \text{ and } \hspace{1cm} C_1:w^2=f^*(v) $$ "glued together" via the maps \begin{equation*} \begin{aligned} C_0 & \to C_1 \\ (x,y) & \mapsto (1/x,y/x^{g+1}) \end{aligned} \end{equation*}
\begin{equation*} \begin{aligned} C_1 & \to C_0 \\ (v,w) & \mapsto (1/v,w/v^{g+1}) \end{aligned} \end{equation*}
Proof of (b): Using the dehomogenization in (a), we have already shown that $C$ consists of $C_0$ and $C_1$. Note that $C_0$ contains all but one or two points of $C$, but these points were shown to be in $C_1$. Thus these are the only two necessary pieces. What is left to show is "gluing" portion.
We need only consider points on $C$ that are on both the affine part of $C_0$ (where $X_0\neq 0$) and the affine part of $C_1$ (where $X_{g+1}\neq 0$). Now, using the coordinates of $C_0$, we see that $X_{g+1}=x^{g+1}$. Thus $$ v =\dfrac{X_g}{X_{g+1}} =\dfrac{x^g}{x^{g+1}} =\dfrac{1}{x} $$ Also $$ u =\dfrac{X_{g+2}}{X_{g+1}} =\dfrac{x^{g+2}}{x^{g+1}} =\dfrac{y}{x^{g+1}} $$ Thus the gluing map $C_0\to C_1$ is $$(x,y)\mapsto (1/x,y/x^{g+1})$$
Now let's look at the other direction. Recall that using the coordinates of $C_1$, we have $X_0=v^{g+1}$. Thus $$ x =\dfrac{X_1}{X_0} =\dfrac{v^g}{v^{g+1}} =\dfrac{1}{v} $$ and $$ y =\dfrac{X_{g+2}}{X_0} =\dfrac{v^{g+2}}{v^{g+1}} =\dfrac{u}{v^{g+1}} $$ Thus the gluing map $C_1\to C_2$ is $$ (v,u)\mapsto (1/v,u/v^{g+1}) $$
** My question is why $\dfrac{x^{g+2}}{x^{g+1}}=\dfrac{y}{x^{g+1}}$? And similarly, $\dfrac{v^{g+2}}{v^{g+1}}=\dfrac{u}{v^{g+1}}$? **
(c) Calculate the divisor of the differential $dx/y$ on $C$ and use the result to show that $C$ has genus $g$. Check your answer by applying Hurwitz's formula (II.5.9) to the map $[1,x] : C \to \mathbb{P}^1$. (Note that Exercise 2.7 does not apply, since $C\not\subset \mathbb{P}^2$).
** For (c), I am not sure how to calculate the divisor of the differential. Do I find $dx/y$ by taking the derivative of the mappings in (b)?
(d) Find a basis for the holomorphic differentials on $C$. (Hint: Consider the set of differential forms $\{x^i dx/y : i=0,1,2,\dots.\}$ How many elements in this set are holomorphic?
(b) Since $C$ is defined with the map $$ [1,x,\dots,x^{g-1},y] : C_0 \to \mathbb{P}^{g+2} $$ and since $K$ is algebraically closed, $\dfrac{x^{g+2}}{x^{g+1}}=\dfrac{y}{x^{g+1}}$ and $\dfrac{v^{g+2}}{v^{g+1}}=\dfrac{w}{v^{g+1}}$
(c) First, let's compute $\,dx/y$. Using the maps from (b), we have $v=\dfrac{1}{x}$ and $w=\dfrac{y}{x^{g+1}}$
Let's rewrite this equations so that we have $x$ and $y$ equal to functions of $u$, and $w$. $x=\dfrac{1}{v}$ and $y=\dfrac{w}{v^{g+1}}$
We can differentiate the first equation and get: $\,dx=-\dfrac{1}{v^2}\,dv$. Hence $$\dfrac{\,dx}{y}=-\dfrac{v^{g-1}}{w}\,dv$$ Recall that a divisor is a formal $\mathbb{Z}$-linear combination of points. The divisor of a differential is of the form $\sum_i n_iP_i$ where the $P_i$ are the points at which the differential has a zero or pole, and $n_i$ is the order of zero or pole.
Since the discriminant is nonzero (i.e. $f$ is separable), we have $d$ distinct roots. Also since $\,dx=-\dfrac{1}{v^2}\,dv$, we have a double poles at $(0,1)$ at $(0,-1)$. Hence the divisor of the differential is $$div(\,dx/y)=P_1+P_2+\dots+P_d-2(0,1)-2(0,-1)$$
What remains to do is actually check that the genus of $C$ is $g$ via Hurtwiz's formula. Let's defined the map $\pi=[1,x]:C\to\mathbb{P}^1$, with genuses $g_1$ and $g_2$ respectively. By Hurtwiz's Formula, $$2g_1-2=\deg(\pi)(2g_2-2)+\sum\limits_{P\in C} (e_\pi(P)-1)$$ Recall that the genus of the projective line is $0$, and $\deg(\pi)=2$. So, $$2g_1-2=-4+\sum\limits_{P\in C} (e_\pi(P)-1)$$ Associated to $C$ is a double cover $\pi:C\to \mathbb{P}^1$ of the projective line. This cover has $2g+2$ ramification points. Hence \begin{gather*} 2g_1-2=-4+(2g+2) \\ 2g_1-2=2g-2 \\ g_1=g \end{gather*} Hence $C$ has genus $g$.
(d) Let $\{x^i\,dx/y | i=0,\dots,g-1\}$. (Note that $0\leq i\leq g-1$ is due to the fact that $K$ is algebraically closed.) To show that this is a suitable basis for holomorphic differentials on $C$. It is enough to show that $x^i\,dx/y$ is holomorphic. i.e. We need to compute the divisor of $x^i\,dx/y$ and show that it has no poles.
Let's begin with the cases where $i=0$. Recall that the equation of $C$ is $y^2=f(x)$. So when we differentiate it, we have the relation $$2y\,dy=f'(x)\,dx \iff \dfrac{\,dx}{y}=\dfrac{\,dy}{f'(x)} $$ Since $C$ is nonsingular, then $y$ and $f'(x)$ can't both vanish. Hence $\,dx/y$ is holomorphic.
Since $x^i$ will just yield zeroes (and not poles), we can use the same argument above when $0<i\leq g-1$. Hence $$\{x^i\,dx/y | i=0,\dots,g-1\}$$ is the basis for the holomorphic differentials on $C$.