How do I prove that this piecewise function is injective?
The function is $f$ from $\mathbb Z$ to $\mathbb Z$, defined as
$$f(x) = \begin{cases} 3x+1\,\,\,\,, & \text{if $x$ ≥ 0} \\ -3x+2, & \text{if $x$ < 0} \end{cases}$$
Usually I would provide my working, but this time I don't even know how to approach this. (http://www.cs.utexas.edu/~isil/cs311h/lecture-functions-6up.pdf) I am learning using this link but there are no notes on the proof, there are just blank slides.