Im trying to fit a convex piecewise linear function into a smooth function.
However I have no idea which kind of function is suitable?
Can anyone give me some examples of function that is suitable to fit a convex piecewise linear function?
UPDATE: The piecewise linear function can be described as follows
$f(x) = a_ix+b_i$ for $t_{i-1} < x \leq t_i$
where $a_i > a_{i-1} > \cdots > a_1 > 0$ and $f(0)=0$
Check this function
f(x) = \begin{cases} -x-3 & \text{if }x \leq -3 \\ x+3 & \text{if }-3 < x < 0 \\ -2x+3 & \text{if }0 \leq x < 3 \\ 0.5x-4.5 & \text{if }x \geq 3 \end{cases}
Hope this helps.