I never got to take Calculus in school (maybe I didn't miss much). I don't know for sure if this will help, but I'm thinking an EV calculator like this one may help.
EV Calculator
Electricity is still a fuel but electric motors don't have as many variables, (pumping losses etc.) Torque curve is flatter. Hope it helps.
__________________
Almost all my driving is done 1-5 miles at a time.
Best short trip: 2.4 l/100 km, 3.9 km