Path difference on a sphere due to geodesic deviation Between two points of same latitude but different longitudes [spherical coordinates $(\theta,\phi)$] we measure two lengths of arcs  $(s_1,s_2)$ along (1) the geodesic or red great circle (a graphic of numerical integration) and (2) along the constant $ \phi$ non-geodesic thicker purple arc  or latitude.

There is no difference of these distances at the equator or poles but is a maximum at some intermediate latitude value.
How to find the $\phi$ at which the difference of these arc distances $ (s_2-s_1) $  is a maximum?
Thanking you in advance.
 A: For convenience of the application we will use earth-like spherical coordinates with $\phi=0$ referring to the equator (so that the poles are at $\phi=\pm\frac\pi2$).
Further we let the azimuthal angle between $s_1$ and $s_2$ be $2\theta\,\, (0<2\theta\le\pi)$.
We seek to maximize over $\phi$ the expression:
$$
D(\theta,\phi)=2\theta\cos\phi-\arccos(\cos^2\phi\cos2\theta+\sin^2\phi)=
2\theta\cos\phi-\arccos(1-A_\theta\cos^2\phi),
$$
with $A_\theta=1-\cos2\theta=2\sin^2\theta$.
Equating the derivative of $D(\theta,\phi)$ over $\phi$ to $0$ we find (besides the trivial case $\sin\phi=0$) the equation
$$
\boxed{\cos^2\phi=\frac{2\theta^2-A_\theta}{\theta^2A_\theta}=\frac1{\sin^2\theta}-\frac1{\theta^2}},
$$
which being resolved gives the maximizing latitude $\phi_\text{max}$.
For small azimuthal separations ($\theta\to0$) $\phi_\text{max}=\arccos\frac1{\sqrt3}\approx 54.74^\circ.$
A: (Not about my answer, regarding part of discussion with user's answer).
F[x_, t_] := t Cos[x] - ArcCos[1 - (1 - Cos[t]) Cos[x]^2]
Plot3D[F[XX, TT], {XX, 0, Pi / 2}, {TT, 0, Pi }, 
 AxesLabel -> Automatic, PlotLabel -> " Geodetic_ Devn"]

Still I am missing something in the unmodified $\phi$ latitude domain of user's function mentioned above .. ( geodesic deviation is more than half earth radius ! ). Please comment.

