My homework asked me to show that $S^3$ is parallelisable. Like in the $S^1$ or $T^n$ cases, I started by parametrising $S^3$ and finding a spanning set for the tangent space at each point, hoping I will discover three spanning vectors that are everywhere linearly independent.
Take a smooth curve $\alpha :(-\epsilon, \epsilon) \to S^3$ with $\alpha(0) = p$. We may parametrise it by $\alpha(t) = (cos(\theta)cos(\phi)cos(\varphi),sin(\theta)cos(\phi)cos(\varphi),sin(\phi)cos(\varphi),sin(\varphi))$ where $\theta, \phi, \varphi : (-\epsilon, \epsilon) \to \mathbb R$. Using this parametrisation, $$T_pS^3 = span\{cos(\theta)cos(\phi)sin(\varphi)\partial_1 + sin(\theta)cos(\phi)sin(\varphi)\partial_2 + sin(\phi)sin(\varphi)\partial_3 - cos(\varphi)\partial_4, \\ cos(\theta)sin(\phi)cos(\varphi)\partial_1 + sin(\theta)sin(\phi)cos(\varphi)\partial_2 - cos(\phi)cos(\varphi)\partial_3, \\ sin(\theta)cos(\phi)cos(\varphi)\partial_1 - cos(\theta)cos(\phi)cos(\varphi)\partial_2\}$$
with $\theta, \phi, \varphi$ evaluated at $0$.
For any $p \in S^3$, the tangent space is a three-dimensional vector space. But when $cos(\phi) = 0$, we see that the third spanning vector vanishes. Hence, at such a point $p$, is the tangent space spanned by only two vectors? This is a contradiction and I don't know what went wrong.
A similar problem arises on $S^2$. If we construct a spanning set as above and it is indeed true that the two spanning vectors are everywhere linearly independent, doesn't that imply that $S^2$ is parallelisable (which it isn't)?
By now I know how to show that $S^3$ is parallelisable, but I can't get my head around what is wrong with arguing like above.
Any help is appreciated!