Given an algebraic variety $X$ and two $Q$-Cartier divisors $D_1$ and $D_2$. Given $f \in H^0(X, \mathcal{O}_X(D_1))$ and $g\in H^0(X, \mathcal{O}_X(D_2))$.
It is always true that $\frac{g}{f}$ is a section of $\mathcal{O}_X(D_2-D_1)$ on the open set $D(f)$?
If not, it is a sufficient condition if $D_1$ is Cartier?
Thanks in advance.