First derivative:
Use the chain rule, which states that #d/dx(cot(u))=-csc^2(u)*(du)/dx#
Thus,
#f'(x)=-csc^2(3x^2-x)*d/dx(3x^2-x)#
#=>-(6x-1)csc^2(3x^2-x)#
Second derivative:
Use product rule in conjunction with the chain rule again.
When doing chain rule with the cosecant function squared, the overriding issue will be the exponent, and then the cosecant.
#f''(x)=-csc^2(3x^2-x)d/dx(6x-1)-(6x-1)d/dx(csc^2(3x^2-x))#
Find each derivative.
#d/dx(6x-1)=6#
#d/dx(csc^2(3x^2-x))=2csc(3x^2-x)d/dx(csc(3x^2-x))#
#color(white)(ssss)# Recall that #d/dx(csc(u))=-csc(u)cot(u)*(du)/dx#.
#=>2csc(3x^2-x) * -csc(3x^2-x)cot(3x^2-x) * (6x-1)#
#=>-2(6x-1)csc^2(3x^2-x)cot(3x^2-x)#
Plug both the derivatives back in to find #f''(x)#.
#f''(x)=-6csc^2(3x^2-x)+2(6x-1)^2csc^2(3x^2-x)cot(3x^2-x)#
This can be further simplified, if you want:
#f''(x)=((72x^2-24x+2)cot(3x^2-x)-6)csc^2(3x^2-x)#