Let $f:X \rightarrow \mathbb{P}^1_k$ be a hyperelliptic curve, where k is a field of characteristic not 2. $\mathbb{P}^1_k$ is the union of $U = Spec k[t]$ and $V = Spec k[s]$ where $s= 1/t$. This gives us $f^{-1}(V) \cup f^{-1}(U) = X$. On pg. 292 of Liu's book, Liu does the following:
He shows that $U' = Spec k[t,y]/(y^2-P(t)$ where $P(t)$ has no square factors, and that $V' = Spec k[s,Z]$ where $P_1(s) = P(1/s)s^{2r}$, where $r = [(deg(P(s)+1)/2]$ and $P_1(s)$ is what we get by restricting (this is just the standard affine opens of the hyperelliptic curve.
He shows that $\Omega^1_{U'/U} = k[t]/(P(t))$ and $\Omega^1_{V'/V} = k[t]/(P_1(t))$. All is clear so far, but here is my problem. He then writes:
"As $\mathbb{P}^1_k = U \cup \{s=0\}$, we have $$H^0(X,\Omega^1_{X/\mathbb{P}^1_k}) = k[t]/(P(t)) \oplus k[s]_m /P_1(s)$$ $m = sk[s]$."
Now, my question is: Why does this hold on global sections? I thought the standard approach was just to calculate on the two affine opens and check that they coincide on intersections?
Edit: Maybe I should use the adjunction formula? But I can't see how really.