When studying homology, I have been told that there is a result called the Snake Lemma that via induction affords us with a long exact sequence of homology groups. I am wondering if the methods/thinking used to prove this last fact can be adapted to prove an analogous result for cohomology groups. In particular, I am trying to work through the following exercise:
Let $U$, $V$ be open subsets of $\mathbb{R}^n$. Take it on faith that there are $C^\infty$ functions $f, g$ on $U \cup V$ such that $f+g =1$, and $f$ (resp. $g$) vanishes outside a closed subset of $U \cup V$ that is contained in $U$ (resp. $V$). How would I construct an exact sequence of cochain complexes: $0 \rightarrow \Omega^* (U \cup V) \rightarrow \Omega^* (U) \oplus \Omega^*(V) \rightarrow \Omega^* (U \cap V) \rightarrow 0. $ From this exact sequence, how should I attempt to deduce a long exact sequence of cohomology groups? Will induction be of service here?
Any constructive input would be appreciated (also, any text sources that you think would be good for me to read related to this result would be great too!).