- Split input into 2 regimes
if (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) < 1.0001974428943352
Initial program 60.1
\[\frac{e^{x} - 1}{x}\]
Taylor expanded around 0 0.3
\[\leadsto \color{blue}{\frac{1}{2} \cdot x + \left(\frac{1}{6} \cdot {x}^{2} + 1\right)}\]
if 1.0001974428943352 < (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))
Initial program 0.0
\[\frac{e^{x} - 1}{x}\]
- Using strategy
rm Applied add-cube-cbrt0.1
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{e^{x} - 1} \cdot \sqrt[3]{e^{x} - 1}\right) \cdot \sqrt[3]{e^{x} - 1}}}{x}\]
Applied associate-/l*0.1
\[\leadsto \color{blue}{\frac{\sqrt[3]{e^{x} - 1} \cdot \sqrt[3]{e^{x} - 1}}{\frac{x}{\sqrt[3]{e^{x} - 1}}}}\]
- Using strategy
rm Applied add-log-exp0.4
\[\leadsto \frac{\sqrt[3]{e^{x} - 1} \cdot \sqrt[3]{\color{blue}{\log \left(e^{e^{x} - 1}\right)}}}{\frac{x}{\sqrt[3]{e^{x} - 1}}}\]
- Using strategy
rm Applied flip--0.4
\[\leadsto \frac{\sqrt[3]{e^{x} - 1} \cdot \sqrt[3]{\log \left(e^{e^{x} - 1}\right)}}{\frac{x}{\sqrt[3]{\color{blue}{\frac{e^{x} \cdot e^{x} - 1 \cdot 1}{e^{x} + 1}}}}}\]
- Recombined 2 regimes into one program.
Final simplification0.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;\left(1 + \frac{1}{6} \cdot {x}^{2}\right) + \frac{1}{2} \cdot x \le 1.0001974428943352:\\
\;\;\;\;\left(1 + \frac{1}{6} \cdot {x}^{2}\right) + \frac{1}{2} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{e^{x} - 1} \cdot \sqrt[3]{\log \left(e^{e^{x} - 1}\right)}}{\frac{x}{\sqrt[3]{\frac{e^{x} \cdot e^{x} - 1}{1 + e^{x}}}}}\\
\end{array}\]