# How do you use the limit definition to compute the derivative, f'(x), for ##f(x)=cos(3x)##?

The definition of derivative in a generic point ##(x,f(x))## is:

##lim_(hrarr0)(f(x+h)-f(x))/h=f'(x)##.

So:

##lim_(hrarr0)(cos(3(x+h))-cos3x)/h=lim_(hrarr0)(cos(3x+3h)-cos3x)/h=##

than, using the formula **sum-to-product**:

##costheta-cosphi=-2sin((theta+phi)/2)sin((theta-phi)/2)##,

##=lim_(hrarr0)(-2sin((3x+3h+3x)/2)sin((3x+3h-3x)/2))/h=##

##=lim_(hrarr0)(-2sin((6x+3h)/2)sin(3/2h))/h=##

##lim_(hrarr0)-2sin(3x+3/2h)*(sin(3/2h)/(3/2h))*3/2=##

The limit of second parenthesis is a similar to the fundamental limit:

##lim_(xrarr0)sinx/x=1## That can becomes:

##lim_(f(x)rarr0)sinf(x)/f(x)=1##,

so:

##=-2sin3x*3/2=-3sin3x##.