We have to identify the intervals where the function is concave upwards and where is concave downward.
We can differentiate them in a graph as:
We then have only one interval where the function is concave upwards: between x = -1 and x = 4. We can identify other intervals where the function is concave downwards and interrupted by discontinuities.
Then, we can write all the intervals as:
