Solution (source code)

= Solution

Here the integrand
$$
L=\frac{\sqrt{1+y'^2}}y
$$
has no explicit $x$-dependence. The <Beltrami identity> therefore gives
$$
L-y'L_{y'}
=\frac1{y\sqrt{1+y'^2}}
=\frac1R
$$
for a positive constant $R$. Thus
$$
y'^2=\frac{R^2-y^2}{y^2},
$$
whose nonvertical solutions are the semicircles
$$
(x-c)^2+y^2=R^2.
$$

The endpoint $(a,a)$ and the prescribed value at $x=b$ both lie on
$$
(x-a)^2+y^2=a^2,
$$
because
$$
(b-a)^2+(2ab-b^2)=a^2.
$$
The required positive arc is consequently
$$
\boxed{y(x)=\sqrt{a^2-(x-a)^2}=\sqrt{2ax-x^2}},
\qquad a\leq x\leq b.
$$
The condition $b<2a$ keeps the endpoint above the $x$-axis. The sketch is the descending part of the upper semicircle of radius $a$ centred at $(a,0)$, from $(a,a)$ to
$$
\left(b,\sqrt{2ab-b^2}\right).
$$
This is precisely a <Geodesic in the Poincare half-plane model>.