0 - 定義
$tanh$是雙曲函數中的一個,$tanh()$為雙曲正切。在數學中,雙曲正切“$tanh$”是由基本雙曲函數雙曲正弦和雙曲余弦推導而來。
$$tanhx=\frac{sinhx}{coshx}=\frac{e^x-e^{-x}}{e^x+e^{-x}}$$
其曲線如下圖所示:
1 - 導數
$$\begin{align*}
tanh^{'}(x)&=((e^x-e^{-x})(e^x+e^{-x})^{-1})^{'} \\
&=(e^x+e^{-x})(e^x+e^{-x})^{-1}-(e^x-e^{-x})(e^x+e^{-x})^{-2}(e^x-e^{-x})\\
&=1-\frac{(e^x-e^{-x})^{2}}{(e^x+e^{-x})^{2}}\\
&=1-tanh^2(x)
\end{align*}$$
2 - 參考資料
https://baike.baidu.com/item/tanh/19711736?fr=aladdin