Given $\omega_i \in \Omega_X(U_i)$ can I find $f\in {\cal O}_X(\cap U_i)$ so that $df = \omega_1 - \omega_2$ As per this question: Duality in algebraic de Rham cohomology I am trying to show that the map $H^1(X,\Omega_X) \rightarrow H^2_{\text dR}(X/k)$, where $X$ is a projective algebraic curve over an algebraically closed field $k$, characteristic $p \geq 0$.
I had already computed the Čech cohomology, and was looking for a shortcut. However, it was suggested that Čech cohomology is the best way of doing this, and to be honest it still gives rise to an interesting question (at least in my opinion).
To be concrete, I will fix the cover I am using: I have a natural projection $\pi\colon X \rightarrow \mathbb P_k^1$, and I let $U_\infty = X \backslash \pi^{-1}(\infty)$, and similarly for $U_0$.
Then
$$ H^1(X,\Omega_X) = \frac{\Omega_X(U_0 \cap U_\infty)}{\{\omega_0 - \omega_\infty|\omega_i \in \Omega_X(U_i)\}}$$
and
$$H^2_{\text {dR}}(X) = \frac{\Omega_X(U_0 \cap U_\infty)}{\{df - \omega_\infty -\omega_0|\omega_i \in \Omega(U_i), f\in{\cal O}_X(U_1\cap U_2)\}}.$$
(Note that I have taken the restrictions as given).
Hence showing that $H^1(X,\Omega_X) \rightarrow H^2_{\text{dR}}(X)$ is surjective is equivalent to showing that the subspaces we are quotienting by are the same, which is equivalent to saying that given any $f \in \mathcal O_X(U_0 \cap U_\infty)$ we can split $df$ in to two differentials, regular on $U_0$ and $U_\infty$ respectively.
So to emphasise, my question is

Why, given any $f \in \mathcal O_X(U_0 \cap U_\infty)$, can we split $df$ in to two differentials, regular on $U_0$ and $U_\infty$ respectively?

 A: So, this is probably not the answer that you want because it doesn't actually tell you how to build $\omega_0$ and $\omega_\infty$, but at least this is why the statement is true. (It also doesn't work in characteristic $p$, where I'm not sure how well-behaved $H^2_{\text{dR}}$ is.)
By the exact sequence linked at the other question, the dimension of $H^2$ is at most one. Since the dimension of $H^1(X, \Omega)$ is exactly one, we need only give a non-trivial class in $H^2_{\text{dR}}(X)$. 
This follows from the residue-theoretic description of the latter: A class in $H^2$ is represented by a finite set $S$ of points, together with, for each $P$ in $S$, a Laurent-expansion $f(T)dT$ where $T$ is a uniformizer in $S$. A global meromorphic form gives rise to such a thing in a clear way, and such a class is trivial if it can be written as a sum of a class coming from a global meromorphic form and a class whose component at each $P$ is exact. See my comments on the other answer for how to extract this description of $H^2$ from the definitions.
Picking any point $P$ with uniformizer $T$, the class $(P, dT/T)$ is not trivial: indeed, any exact form (in the complete local ring at $P$) has residue zero, and any global meromorphic form has the sum of its residues equal to zero (residue theorem -- see Tate again). 
A: A friend has pointed out that Deligne has a theorem stating that the Hodge to de Rham spectral sequence vanishes on the first page in characteristic zero for any smooth projective variety $X$. In particular this tells us that $\dim_k (H_{\text{dR}}^n(X)) = \sum_{p+q=n}\dim_k(H^p(X,\Omega^q))$.
Deligne and Illusie have then extended this result to certain cases in characteristic $p$. In particular, the result holds whenever $X$ is a smooth projective variety and $\dim(X)<p$. Of course this is always the case for curves, and hence $\dim_k(H_{\text{dR}}^2(X) )=1$. Since $H^1(X,\Omega_X) \cong k$ and surjects on to $H^2_{\text{dR}}(X)$ it follows that the spaces are isomorphic.
In particular, see Relevements modulo $p^2$ et decomposition du complexe de de Rham by Deligne, Illusie.
Also, Frobenius and Hodge degeneration, by Illusie, in Introduction to Hodge theory
