 chiodaiokaC

2022-11-26

How do I differentiate ${\mathrm{sin}}^{2}x$?
I thought that because this is true:
${\mathrm{sin}}^{2}x=\left(\mathrm{sin}x{\right)}^{2},$
I could differentiate the expression like this:
$\frac{d}{dx}{\mathrm{sin}}^{2}x=2\mathrm{cos}x.$
But I am supposed to get
$\mathrm{sin}\left(2x\right)\phantom{\rule{1em}{0ex}}\text{or}\phantom{\rule{1em}{0ex}}2\mathrm{sin}x\mathrm{cos}x.$
Why am I wrong? Alayna Phillips

Expert

You can only use the rule: $\frac{d}{dx}{x}^{n}=n{x}^{n-1}$ if x is just x and not a function. In the case for ${\mathrm{sin}}^{2}x$ then as you write it in the form $\left(\mathrm{sin}x{\right)}^{2}$ you can see that we can't use the power rule because it's not just an x term being raised to a constant power, it's a function being raised to a constant power. To differentiate ${\mathrm{sin}}^{2}x$ one must use the Chain Rule because $\mathrm{sin}x$ is a function of x within another function (the function that is squaring $\mathrm{sin}x$) ${x}^{2}$. The chain rule is: $\frac{d}{dx}f\left(g\left(x\right)\right)={g}^{\prime }\left(x\right)×\left({f}^{\prime }\left(g\left(x\right)\right)$ so you can apply that rule for this case with $f\left(x\right)={x}^{2}$ and $g\left(x\right)=\mathrm{sin}x$ ramirezherePYM

Expert

You are using the chain rule incorrectly:
$\frac{d}{dx}f\left(g\left(x\right)\right)=\frac{df}{dx}\left(g\left(x\right)\right)\frac{dg}{dx}\left(x\right)$
Now $f\left(x\right)={x}^{2}$ and $g\left(x\right)=\mathrm{sin}\left(x\right)$, therefore
$\frac{d}{dx}\left(\mathrm{sin}\left(x\right){\right)}^{2}=\stackrel{{f}^{\mathrm{\prime }}\left(g\left(x\right)\right)}{\stackrel{⏞}{2\mathrm{sin}\left(x\right)}}\cdot \stackrel{{g}^{\mathrm{\prime }}\left(x\right)}{\stackrel{⏞}{\mathrm{cos}\left(x\right)}}$
And to explain your other point of confusion: $\mathrm{sin}\left(2x\right)=2\mathrm{sin}\left(x\right)\mathrm{cos}\left(x\right)$ is a well-known trigonometric formula

Do you have a similar question?