how to write a piecewise function expression for y such that it gives different outputs based on the range x given I have x ranging from 0 to 8000. For x from 0 to 3584, y should be 270. For x from 3584 to 6179, y should be gradually changing from 270 towards 360. For x from 6179 to 8000, y should be 360. How can I frame an expression for y?  
 A: $$y = \begin{cases} 270 , &0 \leq x < 3584 \\ 270 + \frac{90(x - 3584)}{(6179-3584)} , &3584 \leq x \leq 6179 \\ 360 , &6179 < x \leq 8000 \end{cases}$$
How: When coming up with a function that has different values at certain partitions of an interval the tool that comes to mind is a piece wise function. The first thing to note is that you want a constant function from $x = 0$ to $x = 3584$, so assign it the value of $y = 270$. Now from $x=3584$ to $x=6179$ we want a gradual increase from $270$ to $360$, which is increasing a total value of $90$, so if we multiply $90$ by a number between $0$ and $1$ as the $x$ values increase we will get our desired result. Note that at $x=3584$ we have $270 + \frac{90(3584-3584)}{6179-3584} = 270$, and then at $x=6179$ we have $270 + \frac{90(6179-3584)}{6179-3584} = 270 + 90 = 360$. For any value in between $3584$ and $6179$ we are multiplying $90$ by a number less than $1$ and obtain that gradual increase in effect. Then, again similarly we just want a constant function from $x=6179$ to $x=8000$, so we assign it the value of $360$.
