Combined IFTE functions
To program a more complicated function such as
you can combine several levels of the IFTE function, i.e.,
'g(x) = IFTE(x<-2, -x, IFTE(x<0, x+1, IFTE(x<2, x-1, x^2)))'
Define this function by any of the means presented above, and check that
g(-3) = 3, g(-1) = 0, g(1) = 0, g(3) = 9.
x
,
⎧
⎪
x
, 1
⎪
g
(
x
)
⎨
x
, 1
⎪
⎪
2
x
⎩
x
2
2
x
0
0
x
2
,
x
2
,
Page 3-37