Representative of a cohomology class in once punctured solid torus Consider a once punctured solid torus $(\mathbb R^2 \times S^1) /\{pt\}$. It is not difficult to see that it is homotopy equivalent to the bouquet of spheres $S^2\vee S^1$. So this guy has a non-trivial second de Rham cohomology.
How can one construct a 2-form representing a cohomology generator?

I am assuming the topology and the differentiable structure is induced from the infinite cylinder. Let $x$ be the point which has been removed. Then find a local chart around of $\mathbb{R}\times S^1$ around $x$ say $\phi : U \rightarrow D$ where $U$ is a sufficiently small neighbourhood of $x$ in $\mathbb{R}\times S^1$and $D$ is the unit disk in $\mathbb{R}^2$. Then finding a 2-form on the manifold is equivalent to finding a 2-form on $D\setminus{0}$ since we can always take this 2-form to a 2-form on the manifold defined on $U\setminus{z}$ and then multiply this by a cutoff function having support inside a compact subset of $U\setminus{z}$ and define $0$ everywhere else. Now there is always a non-closed (and obviously exact) 2-form on $D\setminus{0}$ defined as $(1/z) dz\wedge d\overline{z}$ written in complex coordinates. Once can just write it in real coordinates after some calculation. This 2-form has a non-trivial cohomology class and hence is the generator for the second de Rham cohomology group. 
