# Integer programming: Step function

I am not sure how to solve the following question: Show how the following step function can be represented as a 0-1 expression

$f(x)=b_i$ where $a_{i-1} \le x \le a_i$ , $i=1,2,...n$

where $b_i>b_{i-1}$ for all i=1,2,...,n

• You need to start and end your latex with (double) dollar signs : $$f(x)=b_{i} a_{(I-1)} \le x \le a_i , I=1,2,...n$$ $$\text{ where } b_{i}>b_{(i-1)} \text{ for all } I=1,2,...,n$$ – Mats Granvik Jan 2 '18 at 16:18
• Also, you are mixing lower and upper case "i" rather confusingly. – prubin Jan 3 '18 at 18:28
• Any help, please – user321821 Jan 21 '18 at 6:35