# Derivative of $\frac{e^x−e^{−x}}{e^x+e^{−x}}$

I am curious as how to solve this

I have been trying here and I know the answer is $\dfrac{4}{{(e^x+e^{-x}})^2}$ I have this derivative $y=\dfrac{e^x-e^{-x}}{e^x+e^{-x}}$.

So here is how we do it. Now I understand I have to use the product rule but I have no idea how we got to the solution of $$\dfrac{4}{{(e^x+e^{-x}})^2}$$

So I know we use the product rule but im not sure how they got to $4$ for the top part of the fraction.

-
Please fix the title. – TMM Nov 22 '12 at 20:07

$$y = \dfrac{e^x - e^{-x}}{e^x + e^{-x}} = \dfrac{e^x}{e^x} \times \dfrac{e^x - e^{-x}}{e^x + e^{-x}} = \dfrac{e^{2x} - 1}{e^{2x} + 1} = \dfrac{e^{2x} + 1 - 2}{e^{2x} + 1} = 1 - \dfrac2{e^{2x}+1}$$ \begin{align} \dfrac{dy}{dx} & = - 2 \dfrac{d}{dx} \left(\dfrac1{1+e^{2x}}\right)\\ & = - 2 \dfrac{d}{d e^{2x}} \left(\dfrac1{1+e^{2x}}\right) \dfrac{d(e^{2x})}{dx}\\ & = -2 \left(\dfrac{-1}{(1+e^{2x})^2}\right) \times 2 e^{2x}\\ & = \dfrac{4e^{2x}}{(1+e^{2x})^2} = \dfrac{4}{\dfrac{(1+e^{2x})^2}{e^{2x}}} = \dfrac{4}{\left(\dfrac{1+e^{2x}}{e^{x}} \right)^2}\\ & = \dfrac4{(e^{-x} + e^x)^2} \end{align}

-
Note the function to be differentiated is $\tanh x$ and the result $\mbox{sech}^2 \; x.$ I do not seem to have a code for sech in Latex, so I used mbox. Probably this MathJax has something. – Will Jagy Nov 22 '12 at 20:14
The correct form is \operatorname{sech}. – kahen Nov 23 '12 at 3:53

A little knowledge of hyperbolic functions can help a lot to simplify stuff here:

$$\frac{e^x−e^{−x}}{e^x+e^{−x}}=\frac{\frac{e^x−e^{−x}}{2}}{\frac{e^x+e^{−x}}{2}}=\frac{\sinh x}{\cosh x}=:\tanh x\Longrightarrow$$

$$\Longrightarrow (\tanh x)'=\frac{1}{\cosh^2x}=\frac{4}{(e^x+e^{-x})^2}$$

-