Suppose that we have a curve $X \subset \mathbb{P}^2$ given by $x^n_1 = x_2x^{n-1}_0 - x^n_2$ . How do we show that the curve has genus $(n-1)(n-2)/2$ (whenever the curve is smooth).
I should use the fact that the sequence $$ 0 \to \mathcal{F}(X) \stackrel{\iota}{\to} \mathcal{F}(U_1) \oplus \mathcal{F}(U_2) \stackrel{\delta}{\to} \mathcal{F}( U_1 \cap U_2) $$ is exact. Where $\mathcal{F} =\mathcal{O}_X(D)$ for some divisor $D$ on $X$ and $\{ U_1, U_2\}$ an affine cover of $X$ (however, $X$ should be irreducible I think). Moreover $\iota(f) =( f|_{U_1}, f|_{U_2})$ and $ \delta(f_1,f_2) = f_1|_{U_1 \cap U_2} - f_2|_{U_1 \cap U_2}$ .
There is a hint: compute the cokernel of $\delta$ using bases for the infinite-dimensional vector spaces $\mathcal{O}_X(X_1)$, $\mathcal{O}_X(X_2)$ and $\mathcal{O}_X(X_{12})$ that are as simple as possible. (As a sanity check on your computation: the kernel of $\delta$ should be one-dimensional!)
Any help on how to proceed or how to solve it would really be appreciated!
First, considering the general open cover of $\mathbb{P}^{2}$ and setting $X_{i}=X\cap D(x_{i}) \ \ (i=0,1,2)$ it can be easily seen (by writing down the equation) that $X_{1}\subseteq X_{2}$ and so $\{X_{0},X_{2}\}$ is an open covering of $X$. Therefore, the genus of $X$ can be computed by the sheaf exact sequence
\begin{equation*} 0\longrightarrow {\cal O}_{X}(0)(X)\longrightarrow {\cal O}_{X}(0)(X_{0})\oplus {\cal O}_{X}(0)(X_{2})\longrightarrow {\cal O}_{X}(0)(X_{0}\cap X_{2}). \end{equation*}
But there is a (natural) isomorphism of sheaves of ${\cal O}_{X}$-modules ${\cal O}_{X}(0)\xrightarrow{\sim}{\cal O}_{X}$ and so we may compute the genus of $X$ by computing the dimension of the cokernel of the map $\delta$ in the following exact sequence:
\begin{equation*} 0\longrightarrow {\cal O}_{X}(X)\longrightarrow {\cal O}_{X}(X_{0})\oplus {\cal O}_{X}(X_{2})\overset{\delta}{\longrightarrow} {\cal O}_{X}(X_{02}), \end{equation*}
where $X_{02}:=X_{0}\cap X_{2}$ and $\delta(f_{0},f_{2})=f_{0}|_{X_{02}}-f_{2}|_{X_{02}}$ for each $f_{0}\in{\cal O}(X_{0})$ and $f_{2}\in{\cal O}(X_{2})$.
We will compute $\dim_{k}(\mathrm{coker}\delta)$ by precisely finding a basis of $\mathrm{coker}\delta$.
Note that by dehomogenization we have that the isomorphisms of varieties \begin{equation*} X_{0}\cong Z(f_{0}) \ \ \ \text{and} \ \ \ X_{2}\cong Z(f_{2}), \end{equation*} where $f_{0}=x_{01}^{n}-x_{02}+x_{02}^{n}\in k[x_{01},x_{02}]$ and $f_{2}=x_{21}^{n}-x_{20}^{n-1}+1\in k[x_{20},x_{21}]$. Hence, we have that \begin{equation*} {\cal O}_{X}(X_{0})\cong k[x_{01},x_{02}]/(f_{0}) \ \ \ \ \text{and} \ \ \ \ {\cal O}_{X}(X_{2})\cong k[x_{20},x_{21}]/(f_{2}). \end{equation*}
Before we start, observe that a system of generators for ${\cal O}_{X}(X_{0})$ is
\begin{equation*} T_{0}=\{x_{01}^{i}x_{02}^{j}:0\leq i<n,j\geq 0\} \end{equation*}
and for ${\cal O}_{X}(X_{2})$ is
\begin{equation} T_{2}=\{x_{20}^{i}x_{21}^{j}:i\geq 0,0\leq j<n\} \end{equation}
The above follows directly from the fact that in ${\cal O}_{X}(X_{0})$ we have the relation $x_{01}^{n}=x_{02}-x_{02}^{n}$ and in ${\cal O}_{X}(X_{2})$ the relation $x_{21}^{n}=x_{20}^{n-1}-1$. Hence, $\mathrm{im}\delta$ is generated by the image $T$ of $T_{0}\cup T_{2}$ under the map $\delta$.
We now proceed with the construction of a basis for $\mathrm{coker}\delta$. We have that \begin{equation*} {\cal O}_{X}(X_{02})\cong k[x_{01}.x_{02},x_{20}]/(f_{0},x_{02}x_{20}-1), \end{equation*} i.e. ${\cal O}_{X}(X_{02})$ results by inverting $x_{02}(=x_{2}/x_{0})$ in ${\cal O}_{X}(X_{0})$. Therefore, it can be readily seen that taking into consideration the relations in ${\cal O}_{X})(X_{02})$ and the generating set $T$ of $\mathrm{im}\delta$ the set
\begin{equation*} S=\{x_{01}^{i}x_{20}^{j}:0\leq i<n,j>0\}. \end{equation*}
generates ${\cal O}_{X}(X_{02})$ and so also $\mathrm{coker}\delta$, $S\cap T=\emptyset$ and is linearly independent in ${\cal O}_{X}(X_{02})$. Now by considering the other relation $x_{21}=x_{01}x_{20}$ in ${\cal O}_{X}(X_{02})$ it can (again) be readily seen that we may further refine $S$ into
\begin{equation*} S'=\{x_{01}^{i}x_{20}^{j}:0\leq i<n,0<j<i\}, \end{equation*}
which has cardinality $|S'|=(n-1)(n-2)/2$ and its image forms a basis of $\mathrm{coker}\delta$.