That was an excellent exercise of calculus and of course I gave you a thumbs up. However, you can calculate the distance between two points on a sphere in a a waaaay shorter mode with straightforward geometrical calculations.
I'd like to hear more about this. Note that I wasn't trying to calculate the actual distance between two points, but rather was trying to find the geometry of the shortest path.
@@Freeball99 What do you understand by "the geometry of the shortest path"? ¿The equation of the great circle between those two points? I was under the impression that you were looking for the shortest distance, which can be obtained through the Haversine formula, itself derived from the properties of the spherical triangles, which can be obtained from geometry.
@@betaorionis2164 The haversine formula can indeed be used to calculate the shortest distance between two points on a sphere, but it presupposes that the shortest path lies along a great circle. It does not derive the fact that the shortest path is a great circle; rather, it uses this assumption to compute the arc length directly.
I think you've missed a trick: You can rotate your sphere in such that the P and Q can be put on the axis where either \theta or \phi is constant. That should reduce the complexity dramatically.
You make a good point, however, rotating to make one angle constant actually presupposes a great circle solution. I am treating the problem from the point-of-view of not knowing a priori what the form of the solution is. The Euler-Lagrange method derives this result from first principles, without assuming the answer. It demonstrates how calculus of variations reveals geometric truths purely from mathematics.
Thank you very much for the explanation. It'd be interesting to see the problem applied to other surfaces such as a cone or a cylinder. I know they're flat so it'd be possible to develop them and draw the straight line but I'm not familiar enough with the Lagrangian to do it this way. Well, the cylinder maybe I could because of its similarities to a circle. Maybe even the cone if I follow this video slowly. But I'm still missing the foundation. I need to rewatch your video on the Lagrangian.
*Shortest length between 2 points on a sphere* is simply the direct arc length between them = radius x angle (in radians) between the 2 points subtended at the center of the sphere. Let Center C = (Cx,Cy, Cz) and the points on the sphere are P = (Px, Py, Pz) and Q = (Qx,Qy,Qz), with angle T between them (calculated using arc cos of dot product below). Then, radius of the sphere, R = |P-C| = |Q-C| and related unit vectors are p = (P-C) / |P-C| and q = (Q-C) / |Q-C| with cos T = p . q (dot product). So, shortest arc length = R x T = Radius of the Sphere x Angle in Radians between the 2 points at the center of the Sphere. *Simple, right* ?