$${f}\left({x}\right)=\left({x}^{\mathrm{2}} +{x}+\mathrm{1}\right)^{{sin}\mathrm{2}{x}} \\$$$${f}'\left({x}\right)=…??? \\$$
$$=\:\left({x}^{\mathrm{2}} +{x}+\mathrm{1}\right)^{\mathrm{sin}\:\mathrm{2}{x}} \:\left\{\left(\mathrm{2cos}\:\mathrm{2}{x}\right)\mathrm{ln}\:\left({x}^{\mathrm{2}} +{x}+\mathrm{1}\right)\right. \\$$$$\left.\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:+\frac{\left(\mathrm{2}{x}+\mathrm{1}\right)}{\left({x}^{\mathrm{2}} +{x}+\mathrm{1}\right)}\mathrm{sin}\:\mathrm{2}{x}\:\right\} \\$$
$${taking}\:{log}\:{and}\:{differentiate}\:: \\$$$${y}={g}\left({x}\right)^{{h}\left({x}\right)} \:\:\Rightarrow\:\mathrm{ln}\:{y}\:={h}\left({x}\right)\mathrm{ln}\:{g}\left({x}\right) \\$$$$\frac{\mathrm{1}}{{y}}\frac{{dy}}{{dx}}\:={h}'\left({x}\right)\mathrm{ln}\:{g}\left({x}\right)+{h}\left({x}\right){g}'\left({x}\right)/{g}\left({x}\right) \\$$$$\frac{{dy}}{{dx}}={g}\left({x}\right)^{{h}\left({x}\right)} \left[{h}'\left({x}\right)\mathrm{ln}\:{g}\left({x}\right)+{h}\left({x}\right)\frac{{g}'\left({x}\right)}{{g}\left({x}\right)}\:\right] \\$$