# How do you differentiate g(x) = (x/2)(x-e^(2x)) using the product rule?

Jun 10, 2016

$g ' \left(x\right) = \left(1 - {e}^{2 x}\right) - {e}^{2 x} / 2.$
$g ' \left(x\right) = \left(x - {e}^{2 x}\right) \left\{\frac{d}{\mathrm{dx}} \left(\frac{x}{2}\right)\right\} + \left(\frac{x}{2}\right) \left\{\frac{d}{\mathrm{dx}} \left(x - {e}^{2 x}\right)\right\} = \left(x - {e}^{2 x}\right) \left(\frac{1}{2}\right) + \left(\frac{x}{2}\right) \left\{\frac{d}{\mathrm{dx}} \left(x\right) - \frac{d}{\mathrm{dx}} \left({e}^{2 x}\right)\right\} = \left(x - {e}^{2 x}\right) \left(\frac{1}{2}\right) + \left(\frac{x}{2}\right) \left\{1 - {e}^{2 x} \cdot \frac{d}{\mathrm{dx}} \left(2 x\right)\right\} = \left(x - {e}^{2 x}\right) \left(\frac{1}{2}\right) + \left(\frac{x}{2}\right) \left\{1 - 2 \cdot {e}^{2 x}\right\} = \left(\frac{1}{2}\right) \left\{\left(x - {e}^{2 x}\right) + \left(x - 2 x \cdot {e}^{2 x}\right)\right\} = \left(\frac{1}{2}\right) \left\{2 x - \left(1 + 2 x\right) \cdot {e}^{2 x}\right\} .$
$g ' \left(x\right) = \left(1 - {e}^{2 x}\right) - {e}^{2 x} / 2.$
Note : In fact, as we have to use the product rule, we have done it as above. Otherwise, we can easily derive the solution by first simplifying the function $g \left(x\right)$ as $\left(\frac{1}{2}\right) \left({x}^{2} - x \cdot {e}^{2 x}\right)$ & then differentiating it!