I am reading on calculus, and am trying to understand the deep subject. However i am facing some problem on understanding the differentiation of a trig function and why when

I have understood how you get

by limiting x to 0 for

The part i cannot grasp is why 3 has to pulled out and placed in front of the differentiated function. My book says it has 3x is a function in the function that can be differenciated further by x.

Personally, this sounds like chain rule to me. where by where by z = sin(3x)

In other words i would like to ask if

Or to put it in other words is Even though there is no x in the function?