(i) Find the derivative of x2cos x+5, using first principle.
(ii) For the function f(x)=⎧⎪⎨⎪⎩a+bx,x<24,x=2b−ax,x>2
limx→2f(x)=f(2). Find the values of a and b.