OK, here is a short set of facts without a lot of explanation:
Ohmic losses are small relative to aerodynamic losses at normal speeds and elevations. For short steep hills, the losses to regen down a hill and power up a hill (10% in and 10% out of the battery) can be larger than the aerodynamic losses coasting through the bottom of the hill and letting the speed increase. On long downhills, you will have more energy in the battery at the bottom of the hill than if you go a more moderated speed and add energy to the battery than to let the speed increase to match the aerodynamic force with the gravitational force times the downward slope of the hill. Because aerodynamic drag is a square law force (cube law power needed), it is a non-conservative force, and you minimize total energy used by traveling the minimum constant speed to cover the distance in the time allotted.
I have a LOT of mountain, hypermile driving experience and can tell you that these facts correlate strongly with those experiences.