Question: How can I get function of the graph in this picture?

I am trying to get the function of the curve in this picture. But, I don't know how to start. How can I get function of the graph in this picture?
I guess f(x) = (x + 1) (x - 1) (x - 3), if -1 <= x <=3.5 and f(x) = -(x + 1) (x + 2.5), if -2.5 <=x <=-1.

Please Wait...