Let $\Omega \subseteq \Bbb R^N$ be open, $\omega = \sum_{j=1}^n \omega_j\,{\rm d}x_j$ be a $1$-form in $\Omega$ such that $\sum_{j=1}^N|\omega_j(x)|\neq 0$ for all $x \in \Omega$, and $\theta = \sum_{i=1}^n \theta_i\,{\rm d}x_i$ be another $1$-form in $\Omega$ with $\theta \wedge \omega = 0$.
(a) Check that given $x_0 \in \Omega$, there is a neighbourhood $V_0$ of $x_0$ in $\Omega$ and $f \in {\cal C}^\infty_c(V_0)$ with $\theta = f\omega$ in $V_0$.
(b) If $K \subseteq \Omega$ is compact, conclude that there is $g$ of classe ${\cal C}^\infty$ in some neighbourhood $U$ of $K$ with $\theta = g\omega$ in $U$.
This is an exercise from these notes (in portuguese) in case it matters.
I have some ideas for both items, but I'm having trouble concluding them.
$(a)$. From the condition $\theta \wedge \omega = 0$, we have that $\theta_i\omega_j = \theta_j\omega_i$ for all $i < j$. Suppose without losing generality that $\omega_1(x_0) \neq 0$. Then $\omega_1 \neq 0$ in some neighbourhood $V$ of $x_0$, and so $\theta_j = \theta_1 \omega_j/\omega_1$ for all $j$. So $\theta = \frac{\theta_1}{\omega_1}\omega$ in $V$. But I don't know if $\theta_1/\omega_1 \in {\cal C}^\infty_c(V)$, nor if that $V$ is ultimately the $V_0$ we're looking for, and neither how to use a cutoff function to fix that.
$(b)$. We assume item (a) here. For all $x \in K$ there is a neighbourhood $V_x$ of $x$ and $f_x \in {\cal C}^\infty_c(V_x)$ with $\theta = f_x\omega$ in $V_x$. Then $\{V_x\}_{x \in K}$ is an open cover of $K$ and by compactness there are points $x_1,\cdots,x_n$ in $K$ with $K \subseteq V_{x_1}\cup\cdots\cup V_{x_n}$. Then we take the partition of unity $\phi_j \in {\cal C}^\infty_c(V_{x_j})$, $0 \leq \phi_j \leq 1$, and $\sum_{j=1}^n \phi_j = 1$ in some neighbourhood $U$ of $K$. I want to say that: $$\theta = 1\cdot \theta = \sum_{j=1}^n \phi_j \omega = \sum_{j=1}^n\phi_jf_{x_j}\omega$$and put $g=\sum_{j=1}^n \phi_j f_{x_j}$, which seems the natural way of glueing the $f_{x_j}$'s, but I don't think this is quite right.
Help?
1) I assume they want $\theta$ to be compactly supported otherwise this might be false (just pick $\theta=2\omega$; then the only possible $f$ is not compactly supported.)
For every point $x \in U$, pick $i$ such that $\omega_i(x) \neq 0$. Then for nearby $x$, $\omega_i(x)$ is still not zero. Define $f(x)$ by $\theta_i(x)/\omega_i(x)$, like you did; for the same reason you gave, this is well-defined. It's smooth because for points near $x$ we may fix the $i$ we choose to define it by, because $\omega_i$ is continuous (and hence nonzero near $x$); and because both $\theta_i$ and $\omega_i$ are smooth, and near $x$ $\omega_i$ is never zero, $\theta_i/\omega_i$ is smooth by the quotient rule. (To be honest, I don't really see where compact support comes in here.)
2) Your construction works fine. Again as before I have no idea why you need a finite cover.