# Math Help - Differentiate a function

1. ## Differentiate a function

Hello guys,

Having trouble with differentiating this function, hope you could help me.

y = (e^(-x))(1 - e^(2x))

$y = (e^-x)(1 - e^(2x))$

I tried expanding the bracket first, but then my answer doesn't agree with many diff calculators.

thanks again.

2. Method 1: Expand brackets first

$y = e^{-x}(1 - e^{2x})$

$= e^{-x} - e^{x}$

so $\displaystyle{\frac{dy}{dx} = -e^{-x} - e^{x}}$.

Method 2: Use the Product Rule.

$y = e^{-x}(1 - e^{2x})$

$\displaystyle{\frac{dy}{dx} = e^{-x}\,\frac{d}{dx}(1 - e^{2x}) + (1 - e^{2x})\,\frac{d}{dx}(e^{-x})}$

$= e^{-x}(-2e^{2x}) + (1 - e^{2x})(-e^{-x})$

$= -2e^x - e^{-x} + e^x$

$= -e^{-x} - e^x$.

3. Ahhh, thats the answer I had! Those dammed calculators.

Thanks again for your time.