A solution similar to Roger R’s would be:
Create a rational function that is undefined at x = 2. (requirement). One such function that satisfies the requirement is f(x) = 1 / (x – 2). Note that f(x) has a vertical asymptote at x = 2.
Square the function, then multiply by -1 to obtain symmetric behavior about the line x = 2. Our resulting function is now f(x) = - 1 / (x – 2)2 , whose values are always negative.
These changes render the left branch of the graph to be decreasing for -infinity < x < 2, and the right branch of the graph is increasing for 2 < x < infinity. This means that f ‘(x) < 0 when x < 2 (requirement) and that f ‘(x) > 0 when x > 2 (requirement).
A rational function’s graph as described above will always be concave down, so f’’(x) < 0 for all x /= 2 (requirement).
Finally, we note that f(1) = -1 and f(3) = -1. If we add 1 to f(x), we get g(x) = - 1 / (x – 2)2 + 1 Now g(1) = g(3) = 0 (requirement)
So our final function is g(x) = - 1 / (x – 2)2 + 1
Draw the graph and confirm that the requirements have been met.