Remove denominators in de Rham cohomology Let $\omega = \mathrm d \eta$ be an exact rational $n$-form on $\Bbb P^n$. 
It may happen that the polar locus of $\eta$ is not included in the polar locus of $\omega$. But is it true that $\omega = \mathrm d \eta_0$, where $\eta_0$ is an $(n-1)$-form which is regular where $\omega$ is?

In other words (and considering the affine case), assume that
  $$ F = \partial_1 G_1 + \dotsb + \partial_n G_n $$
  with $F$ and $G_i$'s rational functions in $x_1,\dotsc,x_n$.
  Is it possible to choose the $G_i$ such that their denominators are a power of the denominator of $F$?


I've been unable to provide a counter example to this question whereas the following formulation seems to indicate that there exists one.
Let $X$ be the open set of $\Bbb P^n$ where $\omega$ is regular, and $Z$ the polar locus, in $X$, of $\eta$, so that $Z$ is a hypersurface of $X$.
If I'm not mistaken, a positive answer to my question is equivalent to the injectivity of the restriction map in the de Rham cohomology $$H^n(X)\to H^n(X\setminus Z).$$
And following Hartshorne's On the De Rham cohomology of algebraic varieties, we have an exact sequence
$$ \dotsb \to H^{n-1}(X\setminus Z) \to H^{n-2}(Z) \to H^n(X)\to H^n(X\setminus Z), $$
so that the injectivity of the last arrow is equivalent to the nullity of the previous one, or the surjectivity of the one before, the Poincaré residue map. Is there any reason for this residue map to be surjective? What if $Z$ is smooth, or is a hyperplane?
For $n=2$ we have to check that
$$0\to H^1(X) \to H^1(X\setminus Z) \to H^0(Z) \to 0$$
is exact. Which seems to be true … although I don't know why.

Any thought will be much appreciated, including on the specific case $n=2$.
 A: Since this question is back on the front page, here is another counterexample. Again, it is algebraic but I think it could be made rational in one more variable; it has the nice feature that all the Hodge structures involved are of Tate type.
Let $f(z) = \prod_{i=1}^d (z-z_i)$ with $z_1$, $z_2$, ..., $z_d$ distinct complex numbers. Let $X$ be the affine surface
$$xy = f(z)$$
and let $Z = \{ y=0 \}$. Then $X \setminus Z$ projects isomorphically to $\{ (y,z) : y \neq 0 \}$, and we see that $H^1(X \setminus Z) \cong \mathbb{C}$ and $H^2(X \setminus Z) = 0$. However, $Z$ is the disjoint union of $d$ copies of $\mathbb{C}$. So $H^1(X \setminus Z) \to H^0(Z)$ is not surjective, and $H^2(X) \cong \mathbb{C}^{d-1}$ does not inject into $H^2(X \setminus Z)$.
Concretely, let $\gamma$ be a path from $z_i$ to $z_j$ in $\mathbb{C}$, not passing through another root of $f$. Let 
$$S = \{ (x,y,z) : |x|=|y|=\sqrt{|f(z)|},\ xy=f(z),\ z \in \gamma \}.$$
So $S$ is a $2$-sphere.
On $X$, we have $dx/x + dy/y = f'(z)/f(z) dz$ and thus $(dx \wedge dz)/x = -(dy \wedge dz)/y$, wherever these expressions are defined. Now, $(dx \wedge dz)/x$ is defined except where $x=0$ and $-(dy \wedge dz)/y$ is defined except where $y=0$, and the locus where $x=y=0$ is codimension $2$ in the smooth variety $X$, so $(dx \wedge dz)/x$ extends to a global $2$-form on $X$. For any polynomial $g(z)$, we have $\int_S g(z) (dx/x) \wedge dz = (2 \pi i) \int_{z_i}^{z_j} g(z) dz$. 
So, for most choices of $g$, we have $\int_S g(z) (dx/x) \wedge dz \neq 0$, and $g(z) (dx/x) \wedge dz$ is a closed, non-exact, $2$-form.
A: I finally found a counter example in a note of Émile Picard written in 1899.
It is an algebraic example but it is easily translated into a rational example with an extra variable.
Let $P(t)$ be a square-free polynomial of degree at least three. There is a non-zero polynomial $U(x,y)$ such that
$$ \partial_x\left( \frac{\sqrt{P(x)}}{(y-x)\sqrt{P(y)}}\right) - \partial_y\left( \frac{\sqrt{P(y)}}{(x-y)\sqrt{P(x)}}\right) = \frac{U(x,y)}{\sqrt{P(x)}\sqrt{P(y)}}.$$
Let $F$ be the right-hand side. Note the pole $(y-x)$ which appears inside the derivatives but not in $F$.
Picard proved that there is no rational functions $G_x$ and $G_y$ in $x$, $y$ and $\sqrt{P(x)}\sqrt{P(y)}$ such that:


*

*$F = \partial_x G_x + \partial_y G_y$

*$G_x$ and $G_y$ have no pole outside those of $F$
Indeed, this would imply that $\oint F \mathrm{d}x \mathrm{d}y$ is zero on every cycle on the Riemann variety of $\sqrt{P(x)}\sqrt{P(y)}$.
However, let $a_1$, $a_2$ and $a_3$ be three distinct roots of $P$, and let $\gamma_1$ be a contour in $\mathbb C$ which encloses $a_1$ and $a_2$ but no other root of $P$, and let $\gamma_2$ be a contour in $\mathbb C$ which encloses $a_2$ and $a_3$ but no other root. $\gamma_1 \times \gamma_2$ induces a cycle on the Riemann variety of $\sqrt{P(x)}\sqrt{P(y)}$, and we can check that
$$\oint_{\gamma_1\times \gamma_2} F(x,y)\mathrm{d}x \mathrm{d}y = 4i\pi.$$


Thanks M. Picard !

Picard, Émile. (1899).  Quelques remarques dur les intégrales doubles de seconde espèce dans la théorie des surfaces algébriques, Comptes rendus hebdomadaires des séances de l'Académie des sciences, 129, 539–540, Gallica
