# How do you differentiate g(z) = z^2cos(z)e^(2+z) using the product rule?

May 10, 2018

$\frac{\mathrm{dy}}{\mathrm{dx}} = z {e}^{2 + z} \left(z \cos \left(z\right) - z \sin \left(z\right) + 2 \cos \left(z\right)\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = z {e}^{2 + z} \left(\left(2 + z\right) \cos \left(z\right) - z \sin \left(z\right)\right)$

#### Explanation:

Given $y = u v w$, where $u , v$ and $w$ are all functions of $z$, then $y ' = u v w ' + u v ' w + u ' v w$

$u = {z}^{2}$
$u ' = 2 x$

$v = \cos \left(z\right)$
$v ' = - \sin \left(z\right)$

$w = {e}^{2 + z}$
$w ' = \frac{d}{\mathrm{dz}} \left[2 + z\right] {e}^{2 + z} = {e}^{2 + z}$

So, $\frac{\mathrm{dy}}{\mathrm{dx}} = {z}^{2} \cos \left(z\right) {e}^{2 + z} - {z}^{2} \sin \left(z\right) {e}^{2 + z} + 2 z \cos \left(z\right) {e}^{2 + z}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = z {e}^{2 + z} \left(z \cos \left(z\right) - z \sin \left(z\right) + 2 \cos \left(z\right)\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = z {e}^{2 + z} \left(\left(2 + z\right) \cos \left(z\right) - z \sin \left(z\right)\right)$