This is rather random, so apologises in advance:

I occasionally wonder about this when driving up and down hills – is there a mathematically optimum method of driving to minimise fuel usage and maximise distance travelled, for a specific amount of fuel ‘X’?

Consider a car driving along a sine wave (constant, repetitive hills and troughs) :

If the car had a fixed amount of petrol to drive along the sine wave, what would be the best times to burn the fuel? Would you be best to:

(a) Drive with as constant as possible a speed, maintaining even fuel usage throughout the journey

(b) Use petrol to accelerate rapidly on the downhill portion to gain enough speed to ‘free-wheel’ up the next hill to just clear the brow, or

© ‘Free-wheel’ down the hill and only use petrol when the car threatens to come to a stop on the upward slope.

Is there a relatively easy way to calculate this? Does anyone have a intuitive feeling for which would be the most effective method?

Thanks.