[MATH]f:[-1,1] \mapsto (-4,-2] \cup [2,4)[/MATH]
If you only want an injection, then all you need is that the function be 1-1.
So e.g. map the closed interval [-1,1]
onto any closed sub-interval of the codomain [MATH](-4,-2] \cup [2,4)[/MATH] and make sure the function is 1-1.
This can be achieved with a linear function.
So e.g. map [-1,1]
onto [2,3] [MATH]\subseteq[/MATH] (-4,-2] [MATH]\cup[/MATH] [2,4)
using the map [MATH] f(x)=[MATH][/MATH]\tfrac{1}{2} (x+5)[/MATH]
Clearly this mapping is 1-1, but you would have to prove it using the definition above.
The range is half the width of the domain, that's why I used [MATH]\tfrac{1}{2}[/MATH]. Then I added a number to make sure the image started at 2.
If I had decided to map [-1,1] onto [-3,-2[MATH]\tfrac{2}{3}[/MATH]], then I would have used e.g. [MATH]f(x)=\tfrac{1}{6}(x-17)[/MATH]
This question was about finding an injection. If I wanted a
bijection, then I would want a 1-1 mapping from [-1,1]
onto (-4,-2] [MATH]\cup[/MATH] [2,4)
I.e. the range would have to equal (-4,-2] [MATH]\cup[/MATH] [2,4)
That is a more delicate matter! (But doable)