How can I compute the average distance from the base of a rectangular pyramid to its apex? For example, if the base of the pyramid is 30 feet by 8 feet, and the height of the pyramid is 12 feet, then what is the average distance from the base to the apex, meaning if we measured the distance from every point in the base to the apex, what would be the average distance? Assume that the pyramid is symmetric.
I had originally thought there would be some simple formula for this computation, but mathematicians have informed me it is a complex integral. How can I set that up in Mathematica?