The function f is defined by

f(x) = for

f(x) = for

Both f and its derivative are continuous for all values of x. Find the values of the constants a and b.

I find the derivative for both parts as

f'(x) = for

f'(x) = for

I know how to find a and b if they are continuous for one particular value for x - the function and the derivative are solved by means of simultaneous equations.

I tried to do this method for this question, but found that I achieved varying answers - I tried x=1, x=2 and this resulted in different values for a and b, so I'm guessing that this question requires something a bit different? How would you attempt to solve this?

Thanks for your help