Divisor of a rational section in Ravi Vakil's notes The following is from Exercise 14.2.A of Ravi Vakil's algebraic geometry notes (page 401 here). The exercise asks us to consider the rational section $\frac{x^2}{x+y}$ of the sheaf $\mathcal{O}(1)$ on $\mathbb{P}_{k}^1$ and to compute the corresponding Weil divisor of poles and zeroes. I have a solution but it seems to go against what I think should be intuitively true so I was hoping someone could check it for me.
First of all, it seems to me that intuitively the resulting Weil divisor should be $2[(x)] - [(x+y)]$. However, let me explain my reasoning that led to a different result.
To compute the divisor of a rational section of an invertible sheaf we first have to choose a trivialisation. The obvious choice here is to trivialise on the open subset $D_+(x+y)$ of $\mathbb{P}^{1}$. This gives a trivialisation,
$$
\Psi: \mathcal{O}(1)|_{D_{+}(x+y)} \stackrel{\times \frac{1}{x+y}}{\longrightarrow} \mathcal{O}|_{D_{+}(x+y)}.
$$
On sections, we obtain a map on the ring of homogenous polynomials,
$$
\Psi_{D_{+}(x+y)}: k \Big[ \frac{x}{x+y}, \frac{y}{x+y}    \Big] \cdot (x+y) \longrightarrow k \Big[\frac{x}{x+y} , \frac{y}{x+y}\Big].
$$
Then under this trivialisation, we obtain a section of the field of rational functions on $\mathbb{P}^{1}$. Namely we obtain the quotient of homogenous polynomials of the same degree,
$$
\frac{x^2}{(x+y)^2}.
$$
This then of course gives a Weil divisor of poles and zeroes of $2[(x)] - 2[(x+y)]$.
My confusion is that Ravi seems to say that you need to choose a trivialisation to compute this Weil divisor. But then of course a result of this is that ever single rational section of a line bundle on $\mathbb{P}^{1}$ gives a Weil divisor of degree $0$, since after choosing a trivialisation we will always have a quotient of homogenous polynomials of the same degree. I thought that was only true for principle Weil divisors, not locally principal.
So which answer is correct, my initial intuition, or the answer I obtained by doing the calculation through a trivialisation?
 A: Your initial intuition is right. Your calculation has issues.
First, you need to find an open cover of $\Bbb P^1$ so that $\mathcal{O}(1)$ is trivialized on each piece. You've only selected one affine open, $D_+(x+y)$, which doesn't cover $\Bbb P^1$. You'd want to add in any affine open containing the point you've left out: $[1:-1]$.
Next, your calculation in the affine patch you have picked contains some incorrect arguments. Let's recap your work: you've identified that the coordinate algebra of $D_+(x+y)$ is $k[\frac{x}{x+y},\frac{y}{x+y}]$, that the trivialization map from sections of $\mathcal{O}(1)$ to elements of $k[\frac{x}{x+y},\frac{y}{x+y}]$ is division by $(x+y)$, the image of your section $\frac{x^2}{x+y}$ is $\frac{x^2}{(x+y)^2}$, and that this has a divisor of zeroes and poles $2[(x)]-2[(x+y)]$ inside this patch.
The first step could be slightly clearer: there is a relation between $\frac{x}{x+y}$ and $\frac{y}{x+y}$: they add to one. Instead, I'll write down the coordinate algebra of this patch as $k[\frac{x}{x+y}]$. This means that $\frac{x^2}{(x+y)^2}$, which you've correctly identified as the image of your rational section under trivialization, vanishes to order $2$ at the point $(\frac{x}{x+y})$ and has no other zeroes or poles in this open set, contrary to your claim (the key thing here is that $(x+y)$ isn't inside your trivializing open set, so you can't say anything about what happens here). One way to help resolve this confusion may be renaming the variables: writing $u$ for $\frac{x}{x+y}$, you're dealing with the divisor of $u^2$ on $\operatorname{Spec} k[u]$, which I hope you believe has a zero of order 2 at $(u)$ and no other zeroes/poles inside $\operatorname{Spec} k[u]$. So the divisor of zeroes and poles in this open subset is given by $2[(\frac{x}{x+y})]$, using your notation.
From here, if you added in another trivializing open set containing $[1:-1]$, you'd find that the divisor of zeroes and poles of $\frac{x^2}{x+y}$ under the trivialization on this open set would have a pole at $[1:-1]$, which would complete your computation. For instance, if we took $D_+(x)$ as our trivializing open set, then your section has image $\frac{x}{x+y} = (\frac{y}{x}+1)^{-1}$ in the coordinate algebra $k[\frac{y}{x}]$ under the trivialization map, so it has a pole at $\frac{y}{x}=-1$ of order one and no other zeroes/poles inside $D_+(x)$. This combines with the previous work to verify that $\operatorname{Div}(\frac{x^2}{x+y})=2[(x)]-[(x+y)]$.
