The function f(x) takes a numerical input x and returns 2 times the input value, except for the interval between -20 and 20, where the function returns nan.

