# Thread: How might one write an expression for a function that looks like this?

1. ## How might one write an expression for a function that looks like this?

I'm looking to find an expression for a function that looks like the following.

I clearly need a piece-wise function but I can't quite think of how to write it. Does anyone have any suggestions?

2. ## Re: How might one write an expression for a function that looks like this?

$$f(x)= \begin{cases} x & (0 < x < 1) \\ 1-x & ( 1 < x < 2) \\ f(x-2) & (x > 2) \end{cases}$$

3. ## Re: How might one write an expression for a function that looks like this?

Originally Posted by kinhew93
I'm looking to find an expression for a function that looks like the following.
$f(x) = (x - \left\lfloor x \right\rfloor ){( - 1)^{\left\lfloor x \right\rfloor }}$

SEE GRAPH