f(x) = (x - 1)·SGN(x)
Wir machen eine Wertetabelle von -5 bis 5 und schauen uns das an
f(-5) = (-5 - 1)·SGN(-5) = (-6)·(-1) = 6 Merke: SGN(x) = -1 wenn x < 0
f(-4) = (-4 - 1)·SGN(-4) = (-5)·(-1) = 5
f(-3) = (-3 - 1)·SGN(-3) = (-4)·(-1) = 4
f(-2) = (-2 - 1)·SGN(-2) = (-3)·(-1) = 3
f(-1) = (-1 - 1)·SGN(-1) = (-2)·(-1) = 2
f(0) = (0 - 1)·SGN(0) = (-1)·(0) = 0 Merke: SGN(x) = 0 wenn x = 0
f(1) = (1 - 1)·SGN(1) = (0)·(1) = 0
f(2) = (2 - 1)·SGN(2) = (1)·(1) = 1
f(3) = (3 - 1)·SGN(3) = (2)·(1) = 2
f(4) = (4 - 1)·SGN(4) = (3)·(1) = 3
f(5) = (5 - 1)·SGN(5) = (4)·(1) = 4
Nun kann man auch den Graphen zeichnen.
~plot~ (x-1)*(((x)>0)-(x<0)) ~plot~