Solution (source code)

= Solution

Use the <geodesic Lagrangian> $L=\tfrac12(y^2\dot x^2+x^2\dot y^2)$, where dots denote an <affine parameter> derivative. The <Euler-Lagrange equations> give
$$
\boxed{y^2\ddot x+2y\dot y\dot x-x\dot y^2=0,\qquad
x^2\ddot y+2x\dot x\dot y-y\dot x^2=0.}
$$
These are the <geodesic equations> wherever $xy\ne0$, so the <Riemannian metric> is nondegenerate. Substitution of $y=mx$, $\dot y=m\dot x$ and $\ddot y=m\ddot x$ makes both equations proportional to
$$
x\ddot x+\dot x^2=\frac{d}{d\lambda}(x\dot x)=0.
$$
Thus $\boxed{x^2=A\lambda+B,\quad y=mx}$ is a family of affinely parametrized <geodesics>, on intervals staying within one quadrant. In particular, $m\ne0$ and $x\ne0$ keep the metric nonsingular; the coordinate axes themselves are not regular points of this metric. The coordinate $x$ need not be linear in the <affine parameter>, despite the straight coordinate-space shape of these curves.