A Problem Reading Like "Snake Lemma" meets Cohomology 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!).
 A: Take $M$ to be $U \cup V$, this is a submanifold of $\mathbb{R}^n$, then the sequence you talk about (Mayer-Vietoris sequence) exists and it is $0 \to \Omega^*(M) \to \Omega^*(U) \oplus \Omega^*(V) \to \Omega^*(V \cap U) \to 0$, this means that for all $q \in \mathbb{Z}$ you have a sequence $0 \to \Omega^q(M) \to \Omega^q(U) \oplus \Omega^q(V) \to \Omega^q(U \cap V) \to 0$, which induces a long exact sequence in cohomolgy: $0 \to H^q(M) \to H^q(U) \oplus H^q(V) \to H^q(U \cap V) \to H^{q+1}(M) \to \ldots$. 
This is useful to find $H^q(M)$, if you know what $U$, $V$ and $V \cap U$ are. The snake lemma is used to prove the existence of the map $H^q(U \cap V) \to H^{q+1}(M)$, as you can see if you write out the sequence for $\Omega^q$ for at least $q$ and $q+1$. 
I'm not sure what else your asking.
A: As both of the answers already up say, Snake Lemma is exactly what you want, and it works the same way for cochains as for chains. To elaborate, the only difference between a "chain complex" and a "cochain complex" in terms of algebra is whether the differential decreases dimension by 1, or increases it. This does not matter for the the Snake lemma (except that the boundary map will also increase dimension rather than decrease it). 
A somewhat silly way to see that this does not matter is to take your "cochain complex" $C^{i-1} \to C^i \to C^{i+1}$ and formally define a corresponding "chain complex" with $C_j = C^{-j}$. On this "chain" complex, the differential decreases dimension as usual, and all the theorems carry over. 
Hope this helps. 
