differentiate *g(x)* if $g(x)=e^xf(e^{-x})$ differentiate g(x) if $g(x)=e^xf(e^{-x})$ 
Using any website to evaluate this derivative like wolframalpha.com 
we will get the result ===>    $e^xf(e^{-x})-f'(e^{-x})$
But we know from the Product Rule of derivatives that it will like :
$e^xf'(e^{-x})+f(e^{-x})e^x$
why is there minus sign? and where the term $e^x$ has disappeared?
Very confusing !
 A: You need to apply the chain rule when evaluating $\frac{d}{dx}f(e^{-x})$. Specifically, this derivative is $-e^{-x}f'(e^{-x})$. This extra factor of $e^{-x}$ cancels out the factor of $e^x$ and the negative sign materializes.
A: $$\frac d{dx}\Big( f(e^{-x})\Big) = f'(e^{-x})\cdot \frac{d}{dx}(e^{-x}) = -1\cdot e^{-x} f'(e^{-x}) =- \dfrac {1}{e^x}f'(e^{-x})$$
That gives, for the second term $$(-1)e^x\cdot \frac 1{e^{x}}f'(e^{-x}) = -f'(e^{-x})$$
A: we have $g(x)=e^xf(e^{-x})$ then we get the first derivative by the product and the chain rule:
$g'(x)=e^{x}f(e^{-x})+e^{x}f'(e^{-x})e^{-x}(-1)$
and since $e^{x}e^{-x}=1$ we can simplify the derivative
$g'(x)=e^{x}f(e^{-x})-f'(e^{-x})$
A: $$g(x)=e^xf(e^{-x}) \implies g'(x) = e^x \left(-e^{-x}f'(e^{-x})\right) + e^x f(e^{-x})$$
This is just the product rule for $g = g_1g_2$, where $g_1(x) = e^x$ and $g_2(x) = f(e^{-x})$.
A: I almost never use Lagrange's prime notation for derivatives because it doesn't explicitly show what is given respect to. For this reason, I recommend Leibniz's notation. So now
$$ \frac{d}{dx}[g(x)]=\frac{d}{dx}\left[e^xf(e^{-x})\right] $$
$$= f(e^{-x})\frac{d}{dx}\left[e^x\right]+ e^{x}\frac{d}{dx}\left[f(e^{-x})\right] $$
$$= f(e^{-x})e^x+ e^{x}\frac{d}{d(e^{-x})}\left[f(e^{-x})\right]\frac{d}{dx}[e^{-x}]$$
$$= f(e^{-x})e^x+ e^{x}\frac{d}{d(e^{-x})}\left[f(e^{-x})\right]e^{-x}\frac{d}{dx}[-x]$$
$$= f(e^{-x})e^x+ e^{x}\frac{d}{d(e^{-x})}\left[f(e^{-x})\right]e^{-x}(-1)$$
$$= f(e^{-x})e^x- e^{x}\frac{d}{d(e^{-x})}\left[f(e^{-x})\right]e^{-x}$$
$$= f(e^{-x})e^x- \frac{d}{d(e^{-x})}\left[f(e^{-x})\right]$$
