Rate and quantity problems