Let us denote sin(nx) = u(x), where u is a function of x. The equation is now therefore f(x) =(u(x))^n.
For simplicity, we will write that as f(x) = u^n
By the chain rule, we know that f'(x) = df/dx = (df/du)*(du/dx).
Firstly computing df/du, we find df/du = n*u^(n-1)
Now we need to find du/dx. Since u = sin(nx) , du/dx = ncos(nx).
Therefore, our answer is f'(x) = (df/du)(du/dx) = nu^(n-1)*ncos(nx),
subbing in u = sin(nx) yields the final answer:
f'(x) = n(sin(nx))^(n-1)*ncos(nx)