Q:

Extensions of $\mathbb{Z}$ by $\mathbb{Z}_2$

Well. My question is very concrete. Does anybody know all the groups $G$ such that it fits in a short exact sequence $1\to \mathbb{Z}\to G\to \mathbb{Z}_2 \to 1$, where $\mathbb{Z}_2$ are the integers modulo $2$.
It is well known that such extensions are classified by $H^2(\mathbb{Z}_2,\mathbb{Z})$, and this cohomology group is isomorphic to $\mathbb{Z}_2$. Now the trivial element is represented by any semidirect product, and there are just two of them, explicitely: $\mathbb{Z}\times\mathbb{Z}_2$ and $\mathbb{Z}\rtimes \mathbb{Z}_2 \cong D_\infty$ the inifnite dihedral group. And the nontrivial element can be represented by $\mathbb{Z}$ clearly. 
Is there any extension missing?

A:

These are already all extensions.
Fact. If $A$ is an abelian group on which a group $Q$ acts, then $H^2(Q,A)$ classifies extensions $0 \to A \to E \to Q \to 0$ where the induced conjugation action of $Q$ on $A$ is the given one.
There are two actions of $Q=\mathbb{Z}/2\mathbb{Z}=\langle t \rangle$ on $A=\mathbb{Z}$, namely $t \mapsto \mathrm{id}$ and $t \mapsto -\mathrm{id}$. Let us call them the "trivial" and the "non-trivial" action and compute $H^2$ in each case.
To compute $H^2(Q,A)$, we use the periodic resolution of $\mathbb{Z}[Q]$-modules
$$\dotsc \xrightarrow{1-t} \mathbb{Z}[Q] \xrightarrow{1+t} \mathbb{Z}[Q] \xrightarrow{1-t} \mathbb{Z}[Q] \to \mathbb{Z}_{\mathrm{triv}} \to 0.$$
Applying $\hom_{\mathbb{Z}[Q]}(-,A)$ shows that $H^2(Q,A) = \ker(1-t : A \to A) / \mathrm{im}(1+t : A \to A)$.
For $A=\mathbb{Z}_{\mathrm{triv}}$ we get $H^2(Q,A) = \ker(0 : \mathbb{Z} \to \mathbb{Z})/\mathrm{im}(2 : \mathbb{Z} \to \mathbb{Z}) = \mathbb{Z}/2\mathbb{Z}$.
For $A=\mathbb{Z}_{\mathrm{non-triv}}$ we get $H^2(Q,A) = \ker(2 : \mathbb{Z} \to \mathbb{Z})/\mathrm{im}(0 : \mathbb{Z} \to \mathbb{Z})=0$.
Thus, there are two (isomorphism classes of) extensions of $\mathbb{Z}/2\mathbb{Z}$ by $\mathbb{Z}$ with the trivial action, i.e. central extensions. Since $0 \to \mathbb{Z} \xrightarrow{2} \mathbb{Z} \to \mathbb{Z}/2\mathbb{Z} \to 0$ and $0 \to \mathbb{Z} \to \mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} \to \mathbb{Z}/2\mathbb{Z} \to 0$ are two examples, they must be all. Also, there is a unique extension corresponding to the non-trivial action. Since $0 \to \mathbb{Z} \to D_{\infty} \to \mathbb{Z}/2\mathbb{Z} \to 0$ is an example, every other extension is isomorphic to this one.

