# Greatest integer function with linear function inside

#### Amer

##### Active member
What is the best way to redefine Greatest integer function as a piecewise function for example

f(x) = [ 2x - 3 ] , -2<= x <= 1

#### dwsmith

##### Well-known member
What is the best way to redefine Greatest integer function as a piecewise function for example

f(x) = [ 2x - 3 ] , -2<= x <= 1
If my memory service me correctly, you should be able to write it as
$$f(x) = [2x] - 3$$
At -2, you have -7.
(-2,-3/2), you have -6.
(-3/2,-1) -5
At -1, you have -5
(-1,-1/2) -4
etc
After writing all that out, you should be able to develop a piecewise function.

#### Amer

##### Active member
Thanks, since I am a teacher i was looking for the easiest way to redefine it as a piecewise function.