To get 40 miles out of my 36v 20 ah ping, I have to ride about 12 mph. I suspect the extra 4 cells in the 48v would allow that range at closer to 16 mph.
Another good way to maximise range is to pedal in the right gear, as pointed out above. The idea is , whatever speed you choose on the throttle, pedal enough to go at least 1 mph faster. This puts the motor in the sweet spot that draws less amps. At faster speeds, you need the big chainring to do it. On my commuter I have a 58 tooth front sprocket that allows me to pedal faster than my motors go. But I practice this pedal a bit faster thing all the time what ever speed I ride. When hypermiling, I throttle to about 10 mph, and pedal to about 12-13 and get phenomenal range.
I don't do any tucking, at my age I have something that gets in the way of crouching for an hour. :lol: But if you are young and have no spare tire, tucking really does wonders for lowering wind resistance.
About amps. If amps are pretty low to start with, yes, a headwind or hill will really slow you down. If the question was how to get more speed uphill, or into a wind, the answer would definitely be more amps, and maybe more volts too. If the battery is too small, increasing the controllers amps will not make the battery able to provide those amps. So yeah, you need to start out with at least a battery and controller that can put out 20-30 amps to get any decent performance. Increasing amps of both the controller and battery with voltage the same will have a noticeable effect, but it won't increase top speed so much unless you started with a pretty weak level. But if your battery is only going to put out say, 20 amps without sagging, then adding cells to increase voltage would have an effect on top speed without having to buy higher quality batteries, or increasing the size of the whole pack to be able to provide a higher amp rate.
So the simple answer still remains, go from 36v to 48v to get the cheapest simplest increase in top speed. The extra 12v battery will help keep range similar since the pack just got a bit bigger. At some point this simple solution starts to break down as you reach a particular controller, motor, or battery types limitations. Then the answer starts to be get an x5 instead of a 408 or whatever. In many cases, 48v is plenty of volts, and increasing amps may be better for overall performance before going to 72v. I'd rather have 48v 50 amps than 72v 20 amps. Not for top speed, but for better hill climbing, faster off the line, better into a stiff wind, etc. But with the right motor, 72v 50 amps would be great, just not even close to street legal.
Motor choice for the type of ride makes a huge difference too. I'm riding motor #7 now and all have acted different. Some clearly needed more amps, other more volts, and others went up in smoke with more volts. The best one so far for being average good at all kinds of riding is the E-bikeKit that uses a 9 continents motor. The larger diameter helps tourqe, and this one is wound a bit slower giving even better hill performance. But it is also a very efficient motor at top speed on the flats too, most likely due to the large diameter again. Other vendors sell a faster wound version of this motor if speed is what you want. The point is, a more efficient motor for going fast may be best for speed and range, in addition to the right voltage. If the ride has too many stops though, you'll never see the range because you start and stop too much to ever spend any time in the fast motors efficeint speed range.