Deterministic Inventory Problem with Non-Constant Demand