Method 1:
Calculating derivative for pn
f(x)=pn
where p be a function in x.
For n=1
f'(x)=p'
For n=2
f'(x)=(p2)'=(p⋅p)'=pp'+p'p=2pp′
For n=3
f′(x)=(p3)′=(p⋅p2)′
⇒f′(x)=p(p2)′+p′p2=2p2p′+p2p′
⇒f′(x)=3p2p′
Similarly, for n=n
f′(x)=(pn)′
⇒f′(x)=npn−1p′
Required derivative
Let g(x)=sinnx
Differentiating with respect to x
⇒g′(x)=(sinnx)′=((sinx)n)′
From the above formula, we get
g′(x)=n(sinx)n−1(sinx)′
∴g′(x)=nsinn−1xcosx