Or another rule of thumb which I prefer is to always take the derivative of what's inside... I'll show you what I mean:
If we are to take the derivative of [itex]x^n[/itex] we get [itex]nx^{n-1}[/itex]
but behind the scenes you're also taking the derivative of x, but since this is 1, multiplying by 1 doesn't change anything.
Now if we let x be anything else, such as sinx then we have [itex](sinx)^n[/itex] and taking the derivative of this is the same as before, but this time the derivative of what's inside (in this case, sinx) is cosx so this makes a difference: [itex]n(sinx)^{n-1}.cosx[/itex]
But you also need to dig deeper and keep taking the derivative of what's inside, if there is something further inside.
e.g. [itex]\left(sin(1/x)\right)^n[/itex]
Again, take the derivative by first applying the power rule, and then taking the derivative of sin(1/x) by using the trigo change, so cos(1/x) multiplies on the outside, but finally you also need to take the derivative of 1/x (this was also done behind the scenes in the 2nd example, we took the derivative of x, but again that's 1) so altogether we get:
[tex]n.\left(sin(1/x)\right)^{n-1}.cos(1/x).\frac{-1}{x^2}[/tex]
And you can of course simplify. Anyway, I know this is terribly set out but I hope you understand it
