- Split input into 2 regimes
if x < -0.0071335074373506824 or 0.008092968034014079 < x
Initial program 0.0
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
Taylor expanded around -inf 0.0
\[\leadsto \color{blue}{2 \cdot \frac{1}{e^{-2 \cdot x} + 1} - 1}\]
Simplified0.0
\[\leadsto \color{blue}{\frac{2}{1 + e^{-2 \cdot x}} - 1}\]
- Using strategy
rm Applied add-cube-cbrt0.0
\[\leadsto \color{blue}{\left(\sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} - 1} \cdot \sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} - 1}\right) \cdot \sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} - 1}}\]
if -0.0071335074373506824 < x < 0.008092968034014079
Initial program 59.1
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
Taylor expanded around -inf 59.1
\[\leadsto \color{blue}{2 \cdot \frac{1}{e^{-2 \cdot x} + 1} - 1}\]
Simplified59.1
\[\leadsto \color{blue}{\frac{2}{1 + e^{-2 \cdot x}} - 1}\]
Taylor expanded around 0 0.0
\[\leadsto \color{blue}{\left(x + \frac{2}{15} \cdot {x}^{5}\right) - \frac{1}{3} \cdot {x}^{3}}\]
Simplified0.0
\[\leadsto \color{blue}{(\left(\left(x \cdot \frac{-1}{3}\right) \cdot x\right) \cdot x + \left((\frac{2}{15} \cdot \left({x}^{5}\right) + x)_*\right))_*}\]
- Recombined 2 regimes into one program.
Final simplification0.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -0.0071335074373506824:\\
\;\;\;\;\sqrt[3]{\frac{2}{e^{-2 \cdot x} + 1} - 1} \cdot \left(\sqrt[3]{\frac{2}{e^{-2 \cdot x} + 1} - 1} \cdot \sqrt[3]{\frac{2}{e^{-2 \cdot x} + 1} - 1}\right)\\
\mathbf{elif}\;x \le 0.008092968034014079:\\
\;\;\;\;(\left(x \cdot \left(x \cdot \frac{-1}{3}\right)\right) \cdot x + \left((\frac{2}{15} \cdot \left({x}^{5}\right) + x)_*\right))_*\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{\frac{2}{e^{-2 \cdot x} + 1} - 1} \cdot \left(\sqrt[3]{\frac{2}{e^{-2 \cdot x} + 1} - 1} \cdot \sqrt[3]{\frac{2}{e^{-2 \cdot x} + 1} - 1}\right)\\
\end{array}\]