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

Apr 16, 2017

$\therefore g ' \left(x\right) = {e}^{x} \left\{\left({e}^{x} - 1\right) \left(\cos x - {x}^{2}\right) + {e}^{x} \left(\cos x - {x}^{2}\right) - \left({e}^{x} - 1\right) \left(\sin x + 2 x\right)\right\} .$

#### Explanation:

$g \left(x\right) = \left({e}^{2 x} - {e}^{x}\right) \left(\cos x - {x}^{2}\right) = {e}^{x} \left({e}^{x} - 1\right) \left(\cos x - {x}^{2}\right) .$

We will use the following Product Rule for Diffn. :

$\left(u v w\right) ' = u ' v w + u v ' w + u v w ' .$

$\therefore g ' \left(x\right)$

$= \left\{{e}^{x}\right\} ' \left({e}^{x} - 1\right) \left(\cos x - {x}^{2}\right) + {e}^{x} \left\{\left({e}^{x} - 1\right)\right\} ' \left(\cos x - {x}^{2}\right) + {e}^{x} \left({e}^{x} - 1\right) \left\{\left(\cos x - {x}^{2}\right)\right\} ' .$

$= \left\{{e}^{x}\right\} \left({e}^{x} - 1\right) \left(\cos x - {x}^{2}\right) + {e}^{x} \left\{{e}^{x} - 0\right\} \left(\cos x - {x}^{2}\right) + {e}^{x} \left({e}^{x} - 1\right) \left\{- \sin x - 2 x\right\} ,$

$= {e}^{x} \left({e}^{x} - 1\right) \left(\cos x - {x}^{2}\right) + {e}^{2 x} \left(\cos x - {x}^{2}\right) - {e}^{x} \left({e}^{x} - 1\right) \left(\sin x + 2 x\right) .$

$\therefore g ' \left(x\right) = {e}^{x} \left\{\left({e}^{x} - 1\right) \left(\cos x - {x}^{2}\right) + {e}^{x} \left(\cos x - {x}^{2}\right) - \left({e}^{x} - 1\right) \left(\sin x + 2 x\right)\right\} .$

Enjoy Maths.!