Can every element of a homotopy group of a smooth manifold be represented by an immersion? I originally posted this on MSE but didn't get much of a response, so I'll attempt to post it here. Let me know if this is not appropriate.
Let $M$ be a smooth manifold of dimension $n$. Let $\alpha \in \pi_i (M)$, for some $i \leq n$, and $f:S^i \to M$ be a map of the sphere representing the homotopy class $\alpha$. Can $f$ always be chosen to be an immersion? I.e. does every homotopy class of the maps from the sphere $S^i$ to $M$ contain an immersion?
In the comments of my original post, it is claimed that it doesn't always work when $i=n$, and that it should work for small enough $i$. What about for other values in between?
 A: There exists a simply-connected closed $6$-manifold $M$ with a homotopy class $\alpha\in \pi_4(M)$ which does not contain an immersion. The following argument is due to Diarmuid Crowley, after we realized that my argument with Stiefel-Whitney classes could not produce examples.
According to Wall,
Wall, C. T. C., Classification problems in differential topology. V: On certain 6- manifolds, Invent. Math. 1, 355-374 (1966); Corrigendum. Ibid. 2, 306 (1967). ZBL0149.20601
there exists a $1$-connected closed $6$-manifold $M$ such that $H^*(M)\cong H^*(\mathbb{C}P^3)$, the cup product $H^2(M)\times H^2(M)\to H^4(M)$ is trivial, and the first Pontryagin class $p_1(M)\in H^4(M)$ is non-zero. The relevant classification result is Theorem 5 in the linked paper.
Claim: The Hurewicz map $\pi_4(M)\to H_4(M)$ is onto.
Proof: $M$ has the homotopy type of a CW-complex with one cell in each even dimension betoween $0$ and $6$. Since the cup square of the generator in $H^2(M)$ is trivial, it follows that the attaching map $S^3\to S^2$ of the $4$-cell has trivial Hopf invariant, therefore is trivial. So $M^{(4)}\simeq S^2\vee S^4$. The claim follows.
Now let $\alpha\in \pi_4(M)$ be a class whose Hurewicz image is a generator $x\in H_4(M)$. Suppose $\alpha$ is represented by an immersion $f:S^4\looparrowright M$. The normal bundle of $f$ is a rank $2$ bundle $\nu(f)$ over $S^4$, hence is trivial. Also, $TS^4$ is stably trivial. The isomrphism of bundles $\nu(f)\oplus TS^4 \cong f^*(TM)$ and naturality of Potryagin classes now implies that $f^*(p_1(M))=0\in H^4(S^4)$. Thus
$$
0=\langle f^*(p_1(M)),[S^4]\rangle = \langle p_1(M),f_*[S^4]\rangle = \langle p_1(M),x\rangle
$$ which implies $p_1(M)=0$, a contradiction.
A: If $i=n$, then an immersion $f \colon S^i \to M$ is a local diffeomorphism by the inverse function theorem and $f$ is a finite cover.
For $i<n$, this is a question in homotopy theory, as the Smale-Hirsch theorem tells you that the map
$$Imm(S^i,M) \to Mon(TS^i,TM)$$
sending an immersion to its derivative is a weak equivalence. Here the right side is the space of a vector bundle monomorphisms. Taking the map underlying a vector bundle monomorphism gives a map
$$Mon(TS^i,TM) \to Map(S^i,M)$$
and you are asking when the homotopy fiber over a map $f \colon S^i \to M$ is non-empty. This homotopy fiber is weakly equivalent to the space of bundle maps $TS^i \to f^* TM$ which cover the identity of $S^i$. So we get an answer, in some sense: the tangent bundle $TS^i$ should be a summand of $f^* TM$. It may be hard in practice to see whether this is possible, but it is the type of question that the tools of homotopy theory were designed for.
You can, however, find some easy sufficient criteria. For example, if $M$ is parallellizable: $TS^i$ is a summand of the trivial bundle $\epsilon^{i+1}$ and this is a summand of $f^* TM = \epsilon^n$. More concretely, since oriented $3$-manifolds are parallellizable, every homotopy class of maps $S^2 \to M$ is represented by an immersion.
