21 A store sells $R$ items per day, and the store restocks periodically: every certain number of days, with a fixed quantity each time. It is known that the handling fee for each restocking is $b$, and the storage cost per item per day is $s$. How many days should the store restock to be most economical? What should the restocking quantity be (assuming the scale of commodity circulation is extremely large, and the cycle is long enough to ignore marginal effects, treating the number of days and restocking quantity as real numbers)?
Let $T$ be the number of days between each purchase, and $Q$ be the number of items purchased each time. According to the specified purchasing method, the relationship between inventory $q$ and time $t$ is shown in Figure 8-1. Considering the expenses within one cycle, since the inventory decreases uniformly from $Q$ to 0 over time, the average inventory is $\frac{Q}{2}$, thus the storage cost is $\frac{1}{2} Q T s$. Adding the handling fee, the total expenditure is $\frac{1}{2} Q T s + b$, and the average daily expenditure is $C(T) = \frac{1}{2} Q s + \frac{b}{T}$. Since $R$ items are sold each day, $Q$ and $T$ have the relationship $Q = R T$, therefore $C(T) = \frac{1}{2} R T s + \frac{b}{T}$. By the arithmetic mean inequality, $C(T) \geqslant 2 \sqrt{\frac{1}{2} R T s \cdot \frac{b}{T}} = \sqrt{2 R b s}$, where the equality holds when $\frac{1}{2} R T s = \frac{b}{T}$, i.e., $T = \sqrt{\frac{2 b}{R s}}$, at which point the purchase quantity is $Q = R T = \sqrt{\frac{2 b R}{s}}$.