Aha, thank you! That helps a lot; the integral has a reasonable amount of variation when I integrate with respect to different values of x and y. However, there still seems to be something wrong:
NIntegrate[d, {y, 40, 45}, {x, 85, 90}] now returns 4650.41 km. This can't be the average...
Using the second version with arcsine instead of arctangent, x = 15; y = 10; d yields 7825.55km (distance from 10°N, 15°W to 42°N, 87.5°W...why I have x for longitude and y for latitude is beyond me). This is only a few km off of an online great circle distance calculator...
Thanks for the reply! Here's a short modification to the equation, then, using arcsine:
radians = Pi/180;
startLong = 87.5;
startLat = 42.5;
dlon = startLong - x;
dlat = startLat - y;
a = Sin[dlat/2*radians]^2 +
Cos[y*radians]*Cos[startLat*radians]*Sin[dlon/2*radians]^2;
c =...
Homework Statement
I've constructed a 5°x5° latitude/longitude cell, from 40-45° N and 85-90°W. This puts the center somewhere near the southern tip of Lake Michigan. I'm trying to find the average distance from the center of that cell (42.5°N, 87.5°W) to any other point in that cell...