A factory produces a certain type of lathe, with an annual output of units. The production is divided into several batches, and the production preparation fee for each batch is yuan. Assume that products are put into the market evenly and the next batch is produced immediately after the previous batch is used up, that is, the average inventory is half of the batch size. Assume that the annual inventory fee per unit is yuan. Obviously, if the production batch is large, the inventory cost will be high; if the production batch is small, the number of batches will increase, so the production preparation cost will be high. In order to select the optimal batch size, try to find the functional relationship between the sum of inventory costs and production preparation costs and the batch size in a year.
Solution: Assume that the batch size is , and the sum of inventory cost and production preparation cost is . Since the annual output is , the number of batches produced each year is (let it be an integer). Therefore, the production preparation cost is . Since the inventory quantity is , the inventory cost is . From this we can get the function model as
.
The domain of is . Note that in this question is the number of lathes, and the batch number is an integer, so only takes the positive integer factor of in .