The function f(x) takes a numerical input and returns its negative value if it is positive, and 3 times the input value if it is negative.

