- Split input into 2 regimes
if (exp x) < 0.9984662786877636
Initial program 0.0
\[\frac{e^{x}}{e^{x} - 1}\]
- Using strategy
rm Applied flip3--0.0
\[\leadsto \frac{e^{x}}{\color{blue}{\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(1 \cdot 1 + e^{x} \cdot 1\right)}}}\]
Applied associate-/r/0.0
\[\leadsto \color{blue}{\frac{e^{x}}{{\left(e^{x}\right)}^{3} - {1}^{3}} \cdot \left(e^{x} \cdot e^{x} + \left(1 \cdot 1 + e^{x} \cdot 1\right)\right)}\]
Simplified0.0
\[\leadsto \frac{e^{x}}{{\left(e^{x}\right)}^{3} - {1}^{3}} \cdot \color{blue}{\left(e^{x + x} + \left(1 + e^{x}\right)\right)}\]
if 0.9984662786877636 < (exp x)
Initial program 60.1
\[\frac{e^{x}}{e^{x} - 1}\]
Taylor expanded around 0 0.7
\[\leadsto \color{blue}{\frac{1}{12} \cdot x + \left(\frac{1}{x} + \frac{1}{2}\right)}\]
- Recombined 2 regimes into one program.
Final simplification0.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;e^{x} \le 0.9984662786877636:\\
\;\;\;\;\frac{e^{x}}{{\left(e^{x}\right)}^{3} - {1}^{3}} \cdot \left(\left(e^{x} + 1\right) + e^{x + x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{12} \cdot x + \left(\frac{1}{x} + \frac{1}{2}\right)\\
\end{array}\]