Bott and Tu page 19 - Exercise 1.7 Bott and Tu page 19 - Exercise 1.7
Compute $H^*_{DR}(\Bbb R^2 - P-Q)$ where $P$ and $Q$ are two points in $\Bbb R^2$. Find the closed forms that represent the cohomology classes.

So first of all, we write that we have:
$$0\longleftarrow\Omega^2(\Bbb R^2-P-Q)\longleftarrow\Omega^1(\Bbb R^2-P-Q)\longleftarrow\Omega^0(\Bbb R^2-P-Q)\longleftarrow0$$
So we consider the closed $0$-forms, and they are given by $d(f(x,y))=0=\frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy$
So $\frac{\partial f}{\partial x}=0=\frac{\partial f}{\partial y}$ so that $f$ is constant. So $H^0(\Bbb R^2-P-Q)=\Bbb R$.
Now we want to find closed $1$-forms, and thus $$d(f(x,y) dx+ g(x,y)dy)=0=\frac{\partial f}{\partial y} dydx+ \frac{\partial g}{\partial x}dxdy=(\frac{\partial g}{\partial x} - \frac{\partial f}{\partial y})dxdy=0$$
So we find that:
$$\frac{\partial f}{\partial y} = \frac{\partial g}{\partial x},$$
Then I want to quotient by all exact $1$-forms, which are those $1$-forms that are equal to $df$ for some $f\in \Omega^0(\Bbb R^2-P-Q)$ and hence are of the form $\frac{\partial f}{\partial x} dx+ \frac{\partial f}{\partial y} dy\ne 0$, so these partials cannot be simultaneously zero.
How do I then find $H^1(\Bbb R^2-P-Q)$?
 A: This question has been posted for long but I post my solution here since I'm currently reading Bott&Tu and dealing with the same exercise.
Note that moving $P$ and $Q$ around is an diffeomorphism, we may assume that $P=(0,0)$ and $Q=(2,0)$.
Let $\gamma_1$ be the unit circle and $\gamma_2$ be the unit circle centered at $Q=(2,0)$ and we claim that the linear map $H_{DR}^1(\mathbb{R}^2-P-Q)\to \mathbb{R}^2:[\omega]\mapsto (\int_{\gamma_1}\omega ,\int_{\gamma_2}\omega ) $ is an isomorphism. This map is well-defined, vanishing on exact forms by stoke's theorem as loops do not have boundary. Also there clearly exist forms such that $\int_{\gamma_1}\omega\neq \int_{\gamma_2}\omega$, so by a reflection along $x=1$ we see the surjectivity of the linear map. If we uses the argument principle in complex analysis then we can find easily that the closed form that represents $(1,0)\in \mathbb{R}^2$ is $\frac{1}{2\pi} \frac{xdy-ydx}{x^2+y^2}$ and its translation from $(0,0)$ to $(2,0)$ represents $(0,1)\in \mathbb{R}^2$.
For injectivity, given a closed $1$-form $\omega$ such that $\int_{\gamma_1}\omega =\int_{\gamma_2}\omega =0$, we note firstly that the integration of $\omega$ on any loop $\ell$ must be zero by Stoke's theorem. By Jordan curve theorem a loop must encircle a bounded region in $\mathbb{R}^2$. If the loop does not encircle either $P$ or $Q$, then seeing the loop along with the region it encircles as a submanifold $N$ of $\mathbb{R}^2-P-Q$ and we apply Stokes' theorem, getting $0=\int_N d\omega= \int_\ell \omega$. A same argument shows for any circle $C$ centered at $P$ we have $\int_C\omega=0$ on considering $N$ to be the region between $C$ and $\gamma_1$ along with $C$ and $\gamma_1$; the same result holds for $Q$. So for any loop that encircles $P$ or $Q$ (or both of them) we take sufficiently small circles around $P$ or $Q$ and apply Stoke's theorem with $N$ being the region between the circles and the loop along with the circles and the loop. Now we can define a smooth function $f$ on $\mathbb{R}^2-P-Q$ by integrate $\omega$ along a path $\gamma_x\subset \mathbb{R}^2-P-Q$ from a base-point $x_0$ to another point $x$. This $f$ is well-defined, being independent of the choice of the path $\gamma_x$ by the above result on loops. Apply the mean-value property of integration and we see that $df=\omega$ as desired.
A: If $P=(0,0)$ consider
the 1-form $$\frac{y\,dx-x\,dy}{x^2+y^2}.$$
This represents a generator of $H^1(\Bbb R^2-(0,0))$. It's also
nontrivial in $H^1(\Bbb R^2-(0,0)-Q)$. But you need to also find
a corresponding 1-form "centred" at $Q$.
