# How is this function piece-wise linear?

I encountered this lemma in a research paper related to End-to-End inventory management model.

Please note that $$d_{[t_1,t_2]} = \sum_{t=t_1}^{t_2} d_i$$, where $$d_t$$ denotes demand at time instance t. $$I_{t_1}$$ denotes the inventory level at time $$t_1$$.

I could understand why $$f(a)$$ is a convex function. But I didn't understand why is it a piece-wise function. Subsequenly, I am not able to visualize how the function has extreme points at $$d_{[t_1,s]}-I_{t_1}$$?

Can you please help me understand how $$f(a)$$ is a piece-wise function and how it has extreme points at $$d_{[t_1,s]}-I_{t_1}$$?

For a linear function $$g(a)$$, the function $$g(a)^+=\max(g(a),0)$$ is piecewise linear (with two pieces). Also, finite combinations (weighted sums) of piecewise linear functions are piecewise linear. So $$f(a)$$ is piecewise linear. Because $$h\ge 0$$ and $$b\ge 0$$, $$f(a)$$ is also convex. For a convex piecewise linear function, the claim that “the optimal solution should be one of the extreme points” is a bit too strong because one of the slopes could be $$0$$, yielding an infinite number of optimal solutions. But it is true that at least one extreme point is optimal.
To find the extreme points, note that for $$\max(g(a),0)$$, the extreme point occurs where $$g(a)=0$$.
• Can you please help out with how the extreme points came out to be $d_{[t_1,s]}−I_{t_1}$? I cant figure it out even though I have been trying to understand it for hours now. Commented Jun 2 at 15:04