Solution (source code)

= Solution

For fixed endpoints, the <Euler-Lagrange equation> is $F_y-\frac d{dx}F_{y'}=0$. Since $F$ has no explicit dependence on $x$, differentiating gives
$$
\frac d{dx}(F-y'F_{y'})=F_yy'+F_{y'}y''-y''F_{y'}-y'\frac d{dx}F_{y'}=y'\left(F_y-\frac d{dx}F_{y'}\right)=0.
$$
Thus \b[$F-y'F_{y'}=C$], the <Beltrami identity>.

With $r'=dr/d\theta$, the <arc length> element and the prescribed speed give the travel-time <functional>
$$
\boxed{T[r]=\frac1k\int_0^{\pi/2}\frac{\sqrt{r'^2+r^2}}{r^2}\,d\theta.}
$$
For the circular road $r=a$, this is \b[$T_{\mathrm{circle}}=\pi/(2ka)$].

For the integrand $F=\sqrt{r'^2+r^2}/r^2$, the <Beltrami identity> simplifies to
$$
F-r'F_{r'}=\frac1{\sqrt{r'^2+r^2}}=C.
$$
The candidate $r=a(\cos\theta+\sin\theta)$ has $r'^2+r^2=2a^2$ and the required endpoints. To prove it really minimizes the travel time, rather than merely satisfies a <first integral>, put $u=1/r$. Then
$$
\frac{\sqrt{r'^2+r^2}}{r^2}=\sqrt{u'^2+u^2}.
$$
This is the Euclidean <arc length> integrand for the inverted curve $(X,Y)=(u\cos\theta,u\sin\theta)$, whose endpoints are $(1/a,0)$ and $(0,1/a)$. Every connecting curve has length at least their <Euclidean distance> $\sqrt2/a$, by the <triangle inequality>. Equality is attained by the straight <line segment> $X+Y=1/a$. In polar form it gives $u(\cos\theta+\sin\theta)=1/a$, hence the proposed $r$. It stays strictly positive throughout the interval. Consequently
$$
\boxed{r(\theta)=a(\cos\theta+\sin\theta),\qquad T_{\min}=\frac{\sqrt2}{ka}.}
$$
This <travel-time minimization with speed proportional to squared radius> is globally solved by the inversion: its minimum is strictly less than $\pi/(2ka)$.