How do I use the Limit definition of derivative on

f(x)= x cos x

f(x+h)-f(x) = (x+h) cos(x+h) - x cosx

= x cos(x+h) - x cosx + h cos(x+h)
= x(cosx cosh - sinx sinh) - x cosx + h cos(x+h)
= x cosx cosh - x sinx sinh - x cosx + h cos(x+h)
Now the limit of that as h→0 is
x cosx - x sinx sinh - x cosx + h cosx
= h cosx - x sinx sinh
dividing that by h gives you
cosx - sinx (sinh / h)
and the limit of sinh/h = 1 as h→0, so you wind up with
cosx - x sinx