The equation tool's matrix feature can be used to enter piecewise defined functions.

is entered as y={x2,3x,0,(5x2+1) :, :, :, : (x<-2),(-2<=x<4),(x=4),(x>4)