You are currently viewing Derivative of Hyperbolic Tangent using First Principle of Derivatives
Derivative of tanh(x) using First Principle of Derivatives

Derivative of Hyperbolic Tangent using First Principle of Derivatives

We have seen earlier the derivatives of \sinh(x) and \cosh(x) using the first principle of derivatives. We will prove that, too, for the \tanh(x) using the first principle of derivatives.

Proof. Let f(x) = \tanh(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}}. Then
\begin{align*}
f'(x) &= \lim_{h \rightarrow 0} \frac{f(x+h) - f(x)}{h} \\ 
&= \lim_{h \rightarrow 0} \frac{\tanh(x + h) - \tanh(x)}{h} \\
&= \lim_{h \rightarrow 0} \frac{\frac{e^{x + h} - e^{-x-h}}{e^{x + h} + e^{-x-h}} - \frac{e^x - e^{-x}}{e^x + e^{-x}}}{h} \\
&= \lim_{h \rightarrow 0} \frac{\frac{(e^{x + h} - e^{-x-h})(e^x + e^{-x}) - (e^{x + h} + e^{-x-h})(e^x - e^{-x})}{(e^{x + h} + e^{-x-h})(e^x + e^{-x})}}{h} \\
&= \lim_{h \rightarrow 0} \frac{(e^{x + h} - e^{-x-h})(e^x + e^{-x}) - (e^{x + h} + e^{-x-h})(e^x - e^{-x})}{h(e^{x + h} + e^{-x-h})(e^x + e^{-x})} \\
&= \lim_{h \rightarrow 0} \frac{e^{2x + h} + e^{h} - e^{-h} - e^{-2x-h} - e^{2x + h} + e^{h} - e^{-h} + e^{-2x-h}}{h(e^{x + h} + e^{-x-h})(e^x + e^{-x})} \\
&= \lim_{h \rightarrow 0} \frac{2e^{h} - 2e^{-h}}{h(e^{x + h} + e^{-x-h})(e^x + e^{-x})} \\
&= \lim_{h \rightarrow 0} \frac{2}{(e^{x + h} + e^{-x-h})(e^x + e^{-x})} \cdot \lim_{h \rightarrow 0} \frac{e^{h} - e^{-h}}{h} \\
&= \frac{2}{(e^{x} + e^{-x})(e^x + e^{-x})} \cdot \lim_{h \rightarrow 0} \frac{e^{h} - e^{-h}}{h} \\
&= \frac{2}{(e^{x} + e^{-x})^2} \cdot \lim_{h \rightarrow 0} \frac{e^{h} - e^{-h}}{h}. \\
\end{align*}
Now what is left to prove is \lim_{h \rightarrow 0} \frac{e^{h} - e^{-h}}{h}. Notice that e^{h} - e^{-h} = e^{h} - 1 + 1 - e^{-h}. So
\begin{align*}
\lim_{h \rightarrow 0} \frac{e^{h} - e^{-h}}{h} &= \lim_{h \rightarrow 0} \frac{e^{h} - 1 + 1 - e^{-h}}{h} \\
&= \lim_{h \rightarrow 0} \frac{e^{h} - 1}{h} - \lim_{h \rightarrow 0} \frac{e^{-h} - 1}{h}.
\end{align*}
We have seen in this article, that we have \lim_{h \rightarrow 0} \frac{e^{h} - 1}{h} = 1. The \lim_{h \rightarrow 0} \frac{e^{-h} - 1}{h} is equal to -1, because we could substitute -h in the Maclaurin series. See the mentioned article. Therefore, we get
\begin{align*}
\lim_{h \rightarrow 0} \frac{e^{h} - 1}{h} - \lim_{h \rightarrow 0} \frac{e^{-h} - 1}{h} = 1 - (-1) = 2.
\end{align*}
Continuing where we have been, we get
\begin{align*}
\frac{2}{(e^{x} + e^{-x})^2} \cdot \lim_{h \rightarrow 0} \frac{e^{h} - e^{-h}}{h} = \frac{2}{(e^{x} + e^{-x})^2} \cdot 2 = \frac{2^2}{(e^{x} + e^{-x})^2}.
\end{align*}
Therefore, we get
\begin{align*}
f'(x) = \frac{2^2}{(e^{x} + e^{-x})^2} = \text{sech}^2(x).
\end{align*}

Leave a Reply