Okay, I will try to explain. My 1990 MN article at
http://www.runscore.com/course...mentNews/040_90a.pdf included a derivation of the 2nd order formula in its Appendix, so I will not repeat that derivation here. But I'll try to explain why uphill and downhill grades both increase the effective length of a course.
In my 1990 article, my reference for energy cost of running was the classic paper "Energy cost of running" by Margaria et al, published in Journal of Applied Physiology in 1963. That article is available online at
http://jap.physiology.org/content/18/2/367 Given that it's 51 years old, I was hoping it might be available for free. However, only its Abstract is available for free, and you'd have to pay to read the full paper. The abstract includes the key sentence: "Within these limits, the net kilocalories per kilogram per kilometer values seem to be independent of speed and related only to the incline." Thus, even though energy cost
per unit time is obviously greater when running faster, the energy cost
per unit distance is independent of speed and depends only on the incline.
As for the actual functional dependence of Energy/distance on slope, I re-plotted some of Margaria's data in my 1990 paper. Here is a more schematic version of that plot, with the vertical scale exaggerated to emphasize the curvature:
Here, the curved line represents actual energy cost, while the dashed straight line is the tangent to the curve, drawn at slope = zero.
To the extent that the energy cost can be approximated by the straight tangent line, the effective length would be given by:
L + A*(Hf - Hs)
where L is the course length, A is some coefficient, and Hf and Hs are the finish and start elevations.
But the actual energy cost is given by the curved line. And for both positive and negative slopes, the curved line is above the straight line. We can approximate the curved line as a parabola, in which case the difference between curved and straight lines is proportional to the square of slope. With this parabolic approximation, the formula for effective length is extended to:
L + A*(Hf - Hs) + B*SI
where B is another coefficient and SI is the steepness integral, defined as the integral of squared slope along the course.