Hi Karim,
Yes you are correct... the reason is, as stated, there are really two functions one for x<sin(e) and another for x≥sin(e). In order to make the two equal at x= sin(e) take the limit as x→sin(e) of both functions and then set them equal solve for a as a function of b i.e. a(b) that's what you did. So once e and b are specified a can be calculated so that f(x) is continuous at x=sin(e).
Hope this helps
Jim