Find a function with 4 unstable fixed points

I need to find a function that has 4 fixed points, and all of them are unstable. I don't know how to proceed in this kind of problem, but i know how to find the fixed points in a function, and i know how to determine if the fixed points are unstable or stable, but i never worked constructing a function with $$n-$$fixed points. I think there is a general way to make those functions, but i don't know it.

Any hints?

• Dose it have to be a continuous function? – Q the Platypus Apr 29 at 3:39
• @QthePlatypus isn't neccesary, but if it continuous i think it's harder to find. I'm not sure. – Rodrigo Pizarro Apr 29 at 3:40
• A trivial solution would be to define your function pair wise so f(1) = 1 f(2) = 2 etc and f(n) = n^2 + 6 otherwise. – Q the Platypus Apr 29 at 3:45

Hint: Try $$f$$ of the form $$f(x) = x + c (x-x_1)(x-x_2)(x-x_3)(x-x_4)$$. Now what do you need to be sure that $$x_1, \ldots, x_4$$ are unstable?
• How about, say, $x_1 = 1$, $x_2 = 2$, $x_3 = 3$, $x_4 = 4$? Can you find a $c$ that works? – Robert Israel Apr 29 at 13:58