Vector bundles and de Rham cohomology So $M$ is a compact manifold and I am asked to either prove the following statement or give a counterexample:
if $\pi: E \rightarrow M$ is a vector bundle, then $H^2(E) \simeq H^2(M)$.
I know the definition of a vector bundle, and know how the de Rham cohomology is defined, but that's all I have. After some research, I found that it might have to do with 'homotopy equivalence' but I don't understand it. Can someone explain this without going too deep in technical stuff? Thanks in advance!
 A: This is an elaboration of Nefertiti's comment. One of the most basic (and useful) properties of de Rham cohomology (and, indeed, any cohomology theory) is the homotopy axiom: two homotopic maps induce the same map in cohomology (see, for instance, Bott & Tu, $\S$4). Intuitively: small perturbations don't affect cohomology! Here are some relevant definitions:

Let $X,Y$ be spaces, $I$ the unit interval. By a "map" I mean a continuous map. A homotopy between two maps $f,g:X \to Y$ is a map $F:X \times I \to Y$ such that $F(x,0) = f(x)$ and $F(x,1) = g(x)$. If we think of $I$ as a time scale, then $F$ is a continuous transition in time between $f$ and $g$. We say that $f$ is homotopic to $g$ and write $f \simeq g$.
A homotopy equivalence $f:X \to Y$ is a map with a homotopy inverse $g:Y \to X$: this means that $g \circ f$ is homotopic to the identity on $X$ and $f \circ g$ is homotopic to the identity on $Y$.
Proposition: The de Rham cohomology satisfies the homotopy axiom: $f \simeq g$ implies that the induced maps $f^* = g^*$ coincide.
Proof in Bott & Tu, Corollary 4.1.2.
Corollary: Two homotopy equivalent spaces have isomorphic cohomology.
Proof. Let $f:X \to Y$ be a homotopy equivalence with homotopy inverse $g:Y \to X$. Then by functoriality of de Rham cohomology, $f^* \circ g^* = (g \circ f)^* = 1_X^* = 1_{H^*(X)}$ and $g^* \circ f^* = (f \circ g)^* = 1_Y^* = 1_{H^*(Y)}$. $\square$
A deformation retract of a space $X$ onto a subspace $A$ is a homotopy $F:X \times I \to X$ between the identity on $X$ and a retraction $r:X \to X$ onto $A$. This means that $F(x,0) = x$, $F(x,1) \in A$, and $F(a,1) = a$ for all $x \in X$, $a \in A$. A deformation retract provides a homotopy equivalence between $X$ and $A$, where the retraction with codomain restricted to $A$ is homotopy inverse to the inclusion of $A$ into $X$.

With this in hand, all that we need to show is that the total space of a vector bundle $\pi:E \to M$ deformation retracts onto the $0$-section of the base space, which is homeomorphic to the base space itself. This is done concisely by Andrew D. Hwang here: Total space of vector bundle deformation retracts onto 0-section of base space so I see no need to repeat the argument.
