Let f(x)=x , sgn(x²-1) for -2 ≤ x ≤ 2 , where sgn is the signum function.
Question 334 marksMedium
Let f(x)=xsgn(x2−1) for −2≤x≤2, where sgn is the signum function.
(i) Write f(x) as a piecewise function without the signum.
(ii) Find the range of f.
(i) The signum function gives 1 for a positive number, 0 for zero and −1 for a negative number. Here x2−1>0 when ∣x∣>1, x2−1=0 when x=±1, and x2−1<0 when ∣x∣<1. So
sgn(x2−1)=⎩⎨⎧1,0,−1,1<∣x∣≤2x=−1 or x=1−1<x<1
Multiply each case by x.
f(x)=⎩⎨⎧x,0,−x,0,x,−2≤x<−1x=−1−1<x<1x=11<x≤2
(ii) Find the values on each piece.
On −2≤x<−1: f(x)=x takes the values in [−2,−1).
At x=±1: f(x)=0.
On −1<x<1: f(x)=−x takes the values in (−1,1).
On 1<x≤2: f(x)=x takes the values in (1,2].
The value −1 is never taken. The first piece stops just before −1, and −x=−1 needs x=1, which is not in (−1,1). In the same way, 1 is never taken. The value 0 is already in (−1,1). So
Range of f=[−2,−1)∪(−1,1)∪(1,2]=[−2,2]−{−1,1}
The graph shows the open circles at y=±1 and the two isolated points (−1,0) and (1,0).