- Split input into 2 regimes
if (- (/ 2 (+ 1 (exp (* -2 x)))) 1) < -0.0030461172554450875 or 0.0010350707963469223 < (- (/ 2 (+ 1 (exp (* -2 x)))) 1)
Initial program 0.0
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
- Using strategy
rm Applied add-cbrt-cube0.0
\[\leadsto \frac{2}{\color{blue}{\sqrt[3]{\left(\left(1 + e^{-2 \cdot x}\right) \cdot \left(1 + e^{-2 \cdot x}\right)\right) \cdot \left(1 + e^{-2 \cdot x}\right)}}} - 1\]
if -0.0030461172554450875 < (- (/ 2 (+ 1 (exp (* -2 x)))) 1) < 0.0010350707963469223
Initial program 58.8
\[\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}}\]
- Recombined 2 regimes into one program.
Final simplification0.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;\frac{2}{1 + e^{-2 \cdot x}} - 1 \le -0.0030461172554450875 \lor \neg \left(\frac{2}{1 + e^{-2 \cdot x}} - 1 \le 0.0010350707963469223\right):\\
\;\;\;\;\frac{2}{\sqrt[3]{\left(\left(1 + e^{-2 \cdot x}\right) \cdot \left(1 + e^{-2 \cdot x}\right)\right) \cdot \left(1 + e^{-2 \cdot x}\right)}} - 1\\
\mathbf{else}:\\
\;\;\;\;\left(x + {x}^{5} \cdot \frac{2}{15}\right) - {x}^{3} \cdot \frac{1}{3}\\
\end{array}\]