In class, we defined a vector bundle morphism in the following way:
Definition: Let $\pi_i : E_i \rightarrow B_i$ be a vector bundle $(i = 1,2)$. A smooth map $F : E_1 \rightarrow E_2$ is a vector bundle morphism if there exists a smooth map $f : B_1 \rightarrow B_2$ such that $ \pi_2 \circ F = f \circ \pi_1$ and such that $\forall p \in B_1$, the map $ F: (E_1)_p \rightarrow (E_2)_{f(p)}$ is linear.
I now have the following problem:
Problem: Let $\pi: E \rightarrow M$ be a vector bundle of rank $n$. Show that $E$ is isomorphic to the vector bundle $ \Phi: M \times \mathbb{R}^n \rightarrow M$ if and only if there exists a frame of sections of $E$ (defined over the whole of $M)$. Given such a frame, construct explicitly an isomorphic $E \cong M \times \mathbb{R}^n$.
Attempt: ($\Leftarrow$) Assume there are sections $\left\{ s_1, \ldots, s_n \right\}$ of $E$ such that for each $p \in M$, the set $\left\{s_1 (p), \ldots, s_n(p) \right\}$ is a basis for $E_p$ (the fiber over p). I then wanted to construct the map $F$ in the definition as follows:
$$ F: M \times \mathbb{R}^n \rightarrow E : (p, x^{1}, \ldots, x^{n}) \mapsto \sum_{i=1}^n x^{i} s_i (p).$$ For the map $f$ in the definition I take the identity, i.e. $f = Id$. It is clear the map $F$ I constructed is linear. Then I have to show that $\pi \circ F = f \circ \Phi$.
I calculated $$ \pi(F(p, x^{1}, \ldots, x^{n})) = \pi (\sum_{i=1}^n x^{i} s_i (p)) = \sum_i x^{i} \pi (s_i (p)) = \sum_i x^{i} p $$ by definition of what a section is. Since $\Phi$ is the product bundle, it is just projection onto the first factor. Then I get $$ f(\Phi(p, x^{1}, \ldots, x^{n})) = f(p) = p. $$
It seems the diagram doesn't commute, and I don't know where I went wrong. Any help?
Also, I don't know how to prove the converse. How do I find this frame of sections, i.e. maps $\sigma_i : M \rightarrow E$ with the desired property?