This gives us km/L, so gives us the liters used per kilometer. Then we can find the cost of gas as a function of speed:
Now we will need to know how long the trip will take in order to calculate the costs of driver wages and truck maintenance. Again, using as speed:
So, the total trip will take hours. The total cost, in dollars, is therefore
Now just minimize .