The function f(x) implements a simple affine transformation, scaling the input by a factor of 2 and then adding 1.

