Let $M = \mathbb{R}^2 \setminus \{0\}$. We have a global coordinates $(x, y)$ on $M$. We want to compute the cohomology of the complex
$$0 \to \Omega^0(M)\ \stackrel{d}{\to}\ \Omega^1(M)\ \stackrel{d}{\to}\ \Omega^2(M)\ \to 0$$
where $\Omega^k(M)$ is the space of smooth $k$-forms on $M$. So we want to compute $H^k(M) = Z^k(M)/B^k(M)$ where $Z^k(M) = \{\alpha \in \Omega^k(M),\, d\alpha = 0\}$ (closed $k$-forms) and $B^k(M) = \{d\beta,\, \beta \in \Omega^{k-1}(M)\}$ (exact $k$-forms). In this situation,
- Elements of $\Omega^0(M)$ are just smooth functions $f(x,y)$ on $M$
- Elements of $\Omega^1(M)$ can be written $u(x,y) dx + v(x,y) dy$ (where $u$ and $v$ are smooth functions on $M$)
- Elements of $\Omega^2(M)$ can be written $g(x,y) dx \wedge dy$ (where $g$ is a smooth function on $M$)
Compute $H^0(M)$:
$B^0(M) = \{0\}$ and $Z^0(M)$ consists of functions $f(x,y)$ such that $df = 0$. Since $M$ is connected, this implies that $f$ is constant. It follows that $H^0(M)$ is isomorphic to $\mathbb{R}$.
Compute $H^1(M)$:
This is the where the all the fun happens :)
Let $\alpha \in Z^1(M)$, this means that $\alpha = u(x,y) dx + v(x,y) dy$ with $\frac{\partial v}{\partial x} - \frac{\partial u }{\partial y} = 0$.
Lemma 1: Let $R$ be a closed rectangle in $\mathbb{R}^2$ which does not contain the origin. Then $\int_{\partial R} \alpha = 0$.
Proof: This is just Green's theorem (or Stokes' theorem) (in its most simple setting, where it's not hard to show directly).
Lemma 2: Let $R$ and $R'$ be closed rectangles in $\mathbb{R}^2$ whose interiors contain the origin. Then $\int_{\partial R} \alpha = \int_{\partial R'} \alpha$.
Proof: This is a consequence of Lemma 1. It might be a bit tedious to write down (several cases need to be addressed, according to the configuration of the two rectangles), but it's fairly easy. You need to cut and rearrange integrals along a bunch of rectangles so that the two initial integrals agree up to integrals along rectangles who do not contain the origin.
Let's denote by $\lambda(\alpha)$ the common value of all integrals $\int_{\partial R} \alpha$ when $R$ is a closed rectangle whose interior contains the origin.
Lemma 3: If $\alpha$ is exact iff $\lambda(\alpha) = 0$.
Proof: "$\Rightarrow$" is trivial1, let's prove the converse. Fix permanently some point $m_0 \in M$, whichever you like best. For any $m\in M$, consider a rectangle $R$ in $\mathbb{R}^2$ whose boundary contains $m_0$ and $m$ but avoids the origin. Let $\gamma$ be one of the two paths joining $m_0$ and $m$ along $\partial R$. Let $f(m) = \int_\gamma \alpha$. Since $\lambda(\alpha) = 0$, this definition does not depend on the choice of the rectangle or the path. In other words $f: M \rightarrow \mathbb{R}$ is well defined. Let's see that $df = \alpha$. Check that $\frac{f(x+h, y) - f(x,y)}{h} = \frac{1}{h}\int_x^{x+h} u(t,y) dt$, so that taking the limit when $h\rightarrow 0$ yields $\frac{\partial f}{\partial x} = u$. Same for $v$.
Finally let's consider the $1$-form $d\theta = \frac{-ydx + xdy}{x^2 + y^2}$. NB: Be well aware that $d\theta$ is a misleading (but standard) notation: it is not an exact form.
Lemma 4: $d\theta$ is a closed $1$-form and $\lambda(d\theta) = 2\pi$.
Proof: This is a direct computation.
Now're done:
Proposition: $H^1(M)$ is the one-dimensional vector space spanned by $[d\theta]$.
where $[d\theta]$ denotes the class of $d\theta$ in $H^1(M)$. Note that $[d\theta] \neq 0$: see Lemma 4 and 3.
Proof: Let $\alpha$ be a closed $1$-form. Consider $\beta = \alpha - \frac{\lambda(\alpha)}{2 \pi} d\theta$. We have $\lambda(\beta) = 0$ so $\beta$ is exact by Lemma 3. This proves that $[\alpha] = \frac{\lambda(\alpha)}{2 \pi} [d\theta]$.
Compute $H^2(M)$:
Let's show that $H^2(M) = 0$, in other words every closed $2$-form on $M$ is exact. This solution is taken from Ted Shifrin in the comments below.
Here's the idea: in polar coordinates, a $2$-form $\omega$ can be written $\omega = f(r,\theta) dr \wedge d\theta$. Then $\eta = (\int_1^r f(\rho, \theta) d\rho)\, d\theta$ is a primitive of $\omega$.
Although it's not very insightful, this can be checked by a direct computation without refering to a change of variables.
Let $\omega(x,y) = g(x,y) dx \wedge dy$. Define $$h(x,y) = \int_1^{\sqrt{x^2+y^2}} t\, g\left(\frac{tx}{\sqrt{x^2+y^2}}, \frac{ty}{\sqrt{x^2+y^2}}\right) \,dt$$
Check that $h(x,y) d\theta$ is a primitive of $\omega$.
NB: Any course / book / notes on de Rham cohomology will show that if $M$ is a connected compact orientable manifold, $H^n(M) \approx \mathbb{R}$. However, I don't think I've read anywhere that when $M$ is not compact, $H^n(M) = 0$. I wonder if there is an "elementary" proof.
1 I'll explain this by request of OP. It is a general fact that if $\gamma : [a, b] \rightarrow M$ is a ${\cal C}^1$ path and $\alpha$ is a smooth exact one-form i.e. $\alpha = df$ where $f$ is a smooth function, then $\int_\gamma \alpha = f(\gamma(b)) - f(\gamma(a))$. This is because $\int_\gamma \alpha = \int_a^b \alpha(\gamma(t))(\gamma'(t))\,dt$ (by definition) and here $\alpha(\gamma(t))(\gamma'(t)) = df(\gamma(t))(\gamma'(t)) = f'(\gamma(t)) \gamma'(t) = \frac{d}{dt}\left(f(\gamma(t))\right)$.
This fact extends to piecewise ${\cal C}^1$ maps by cutting the integral. In particular, is $\gamma$ is a closed piecewise ${\cal C}^1$ path and $\alpha$ is exact, then $\int_\gamma \alpha = 0$.
In fact, it is useful (e.g. for Cauchy theory in complex analysis) to know that
- A one-form is closed iff its integral along any homotopically trivial loop is zero (any boundary of a rectangle contained in the open set is enough).
- A one-form is exact iff its integral along any loop is zero.
Note that the "smooth" condition can be weakened.
Best Answer
Let me address items 1 and 3 in a cetain amount of detail, and item 2 very briefly at the end.
You say you are aware of homotopy equivalences and Mayer-Vietoris, but don't neglect homeomorphisms!
First, from what you are aware regarding $\mathbb R^3 \setminus \{\text{a single line}\}$ I'm sure you could figure out that $\mathbb R^3 \setminus \{\text{$n$ parallel lines all in the same plane}\}$ is homotopy equivalent to $\mathbb R^2 \setminus \{\text{$n$ points all in the same line}\}$.
The key idea is to prove:
So in your case 1, the space is homeomorphic to $\mathbb R^3 \setminus \{\text{two disjoint, parallel lines}\}$ which is homotopy equivalent to $\mathbb R^2 \setminus \{\text{two points}\}$.
Let me do the case $n=2$ in full detail, after which I'll suggest some ideas for going beyond that case.
Consider two disjoint non-parallel lines $L,M$. Connect them by the unique line segment $\overline{A B}$, $A \in L$, $B \in M$ that means $L$ and $M$ at right angles. Let $P$ be the plane that bisects $A,B$ perpendicularly. By applying a rigid motion of Euclidean space, we may assume that $P$ is the $xy$-plane, $A = (0,0,c)$, and $B = (0,0,-c)$. The line $L$ lies in the plane $z=c$, and by applying a rigid rotation of Euclidean space around the $z$-axis we may assume that $L$ is parallel to the $x$-axis. Looking down the $z$-axis and projection to the $x,y$ plane, the projection of $L$ is the $x$-axis, and the projection of $M$ makes some positive angle $\theta$ with respect to the $x$-axis.
Now we are going to apply a non rigid homeomorphism of Euclidean 3-space, in three parts.
First, all points with $z \ge 0$ are fixed.
Second, the entire portion of the plane with $z \le -c$, is rigidly rotated around the $z$ axis by an angle of $-\theta$; after this rotation, the image $M'$ of the line $M$ is parallel to the $x$-axis hence to $L$.
Third, for $-c \le z_0 \le 0$, the plane $z=z_0$ is rotated rigidly around the $z$ axis by an angle $-\theta \cdot \frac{z_0}{c}$.
That's it for $n=2$!
I think the best thing to do in general is to use the ideas of this proof to construct a proof by induction for larger values of $n$.
For some final comments regarding item 2, instead of planes, think of spheres centered at the intersection point $P$: the space $\mathbb R^3 - \{\text{two lines intersecting at $P$}\}$ is homotopy equivalent to a sphere centered on $P$ minus the four points where those lines puncture that sphere.