The first part can be skipped; one can just write out the length element straightaway.
Find the length element in cylindrical coordinate system
(Notice that it is given that
is a function of
so this is just a parametric equation of a helix with
as a parameter, provided that
must be a linear function.)
Given that the path is expressed as
, its length is found by integrating over
which is the independent variable.
We see that for this problem,
Since this is independent of
and the second form
of the Euler equation (see more below) should be used. (It's easier!)
is now easily pictured as a helix. As
increases, and the path traces around a cylinder helically.
Now knowing it is just a straight line if the surface is unwrapt and formed into a plane, when it is given that the end points are
then the length is, using Pythagorean theorem,
can be evaluated.
[Unparseable or potentially dangerous latex formula. Error 6 ]
to obtain the geodesic's length.