Solution (source code)

= Solution

The <Euler-Lagrange equations> for the kinetic <Lagrangian> are
$$
\frac d{dt}(g_{ab}\dot x^b)-\frac12\partial_a g_{bc}\dot x^b\dot x^c=0.
$$
Expanding and multiplying by the <inverse metric> gives the <geodesic equation>
$$
\boxed{\ddot x^a+\Gamma^a_{bc}\dot x^b\dot x^c=0,\qquad
\Gamma^a_{bc}=\frac12g^{ad}(\partial_b g_{dc}+\partial_c g_{db}-\partial_d g_{bc}).}
$$
The kinetic variational principle uses an <affine parameter>; the energy $g_{ab}\dot x^a\dot x^b/2$ is constant along its solutions. Constant curves are also <geodesics>.

For the <Poincaré half-plane model>, translation in $x$ gives the <conserved quantity> $p=\dot x/y^2$, and the energy is $E=(\dot x^2+\dot y^2)/(2y^2)$. If $p=0$, the nonconstant <geodesics> are vertical lines, with $y=y_0e^{\pm\sqrt{2E}t}$. If $p\ne0$,
$$
\left(\frac{dy}{dx}\right)^2=\frac{2E}{p^2y^2}-1.
$$
Writing $R^2=2E/p^2$ and integrating $dx/dy=\pm y/\sqrt{R^2-y^2}$ yields $(x-x_0)^2+y^2=R^2$. Thus nonconstant <geodesic> images are vertical lines or upper semicircles meeting the real axis orthogonally.

For the two specified points, the circle centre is $(6,0)$ and the radius is five:
$$
\boxed{(x-6)^2+y^2=25,\qquad y>0.}
$$
For example, an affine unit-speed parametrization is $x=6+5\tanh t$, $y=5\operatorname{sech}t$. The endpoints on the real axis are $(1,0)$ and $(11,0)$, outside the hyperbolic surface.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2017/ii/paper-4-geodesic.png]
{title=The upper-half-plane geodesic through the two specified points}