find the derivative of cosx by first principle of derivative
f(x) = cos x
f(x+h) = cos (x+h)
denoting dy / dx by f ' (x)
f ' (x) = lt h....>0 f(x+h) - f(x) / h
f ' (x) = lt h....>0 cos (x+h) - cos (x) / h
f ' (x) =lt h....>0 - 2sin (x +h+x / 2 ) sin (x+h-x / 2) / h {using cosx - cosy}
f ' (x) = - 2sin (x +0+x / 2 ) lt h....>0 sin (h / 2) / h
f ' (x) = - 2sin (x ) lt h....>0 sin (h / 2) / 2h/2
f ' (x) = - sin (x ) lt h....>0 sin (h / 2) / h/2 { lt h....>0 sin (h / 2) / h/2 =1 }
therefore
f ' (x) = - sin (x )
d (cos x) / dx = - sinx
hope might help you