A function f(x) is defined to equal cos(ax) + b for x>=0 and 2 – x3 for x < 0, where a and b are constants. It is known that this function is differentiable everywhere. Find all possible values of a and b

My answer was that a could be anything and b has to have a value of 2. Could someone confirm this. Thank you.