# How do you differentiate p(y) = y^2sin^2(y)cos(y) using the product rule?

Nov 5, 2015

Consider two of the three functions forming p(y) as a single function, and then use the product rule a second time when calculating its derivative.

#### Explanation:

The product rule states that $\left(f \cdot g\right) ' = f ' \cdot g + f \cdot g '$. In this case, let's let ${f}_{1} \left(y\right) = {y}^{2} , {f}_{2} \left(y\right) = {\sin}^{2} \left(y\right)$, and ${f}_{3} \left(y\right) = \cos \left(y\right)$.

Additionally, let's let ${f}_{4} \left(y\right) = {f}_{2} \left(y\right) {f}_{3} \left(y\right)$

We now have $p \left(y\right) = {f}_{1} \left(y\right) \cdot {f}_{4} \left(y\right)$

Applying the product rule gives us $p ' \left(y\right) = {f}_{1} ' \left(y\right) \cdot {f}_{4} \left(y\right) + {f}_{1} \left(y\right) \cdot {f}_{4} ' \left(y\right)$

But to calculate ${f}_{4} ' \left(y\right)$ we need to apply the product rule again, giving ${f}_{4} ' \left(y\right) = {f}_{2} ' \left(y\right) \cdot {f}_{3} \left(y\right) + {f}_{2} \left(y\right) \cdot {f}_{3} ' \left(y\right)$

Then, substituting for ${f}_{4} \left(y\right)$ and ${f}_{4} ' \left(y\right)$ gives us $p ' \left(y\right) = {f}_{1} ' \left(y\right) \cdot \left({f}_{2} \left(y\right) \cdot {f}_{3} \left(y\right)\right) + {f}_{1} \left(y\right) \cdot \left({f}_{2} ' \left(y\right) \cdot {f}_{3} \left(y\right) + {f}_{2} \left(y\right) \cdot {f}_{3} ' \left(y\right)\right)$

${f}_{1} ' \left(y\right) = 2 y$ (power rule)
${f}_{2} ' \left(y\right) = 2 \sin \left(y\right) \cos \left(y\right)$ (chain rule)
${f}_{3} ' \left(y\right) = - \sin \left(y\right)$

Putting it all together gives us

p'(y)=2y(sin^2(y)cos(y))+y^2($2 \sin \left(y\right) \cos \left(y\right)$cos(y)+sin^2(y)(-sin(y)))