Equation of geodesic in $\mathbb{R}\times\mathbb{S}^1$ connecting two points $(x,r)$ and $(y,s)$. What is the equation of the geodesic in $M=\mathbb{R}\times\mathbb{S}^1$ connecting two points $(x,r)$ and $(y,s)$? I know the equation is of the form $(tx+(1-t)y,e^{cit}),\ t\in[0,1]$ for some constant $c$ depends on $r$ and $s$ but I can not determine the constant $c$. Please help me.
Thank you.
 A: $r$ & $s$ are in  $\mathbb{S}^1$ so there exist $\theta$ and $\phi$ such that $r=e^{i \theta}$ & $s=e^{i \phi}$. The geodesic can now be paramterised as follows ... 
\begin{eqnarray*}
(tx+(1-t)y, e^{i(t \theta +(1-t)\phi)}).
\end{eqnarray*}
A: The asserted form is not quite correct: Assuming the metric on $\Bbb R \times \Bbb S^1$ is the product metric, the geodesic equation in standard coordinates $(x, \theta)$ becomes $$x'' = 0, \qquad \theta'' = 0 ,$$
so that (locally) the geodesics are precisely the curves whose $x$ and $\theta$ components are affine functions. Passing back to the manifold, these are the curves
$$\gamma : t \mapsto (a t + b, e^{i(c \theta + d)}) .$$
Substituting the given conditions $\gamma(0) = (x, r)$ and $\gamma(1) = (y, s)$ gives that $$a = (y - x), \qquad b = x, \qquad e^{ic} = s r^{-1}, \qquad e^{id} = r .$$
Now, there are countably many solutions $c$ to $e^{ic} = s r^{-1}$, and each of these yields a different geodesic satisfying conditions---roughly speaking, each of these geodesics wraps around the cylinder (or, the $\Bbb S^1$ factor) a different number of times.
