- Split input into 2 regimes
if wj < 3.03963131152792666e-12
Initial program 12.9
\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Simplified12.9
\[\leadsto \color{blue}{wj + \frac{\frac{x}{e^{wj}} - wj}{wj + 1}}\]
Taylor expanded around 0 0.7
\[\leadsto \color{blue}{\left({wj}^{2} + x\right) - 2 \cdot \left(wj \cdot x\right)}\]
Simplified0.8
\[\leadsto \color{blue}{x + wj \cdot \left(wj - x \cdot 2\right)}\]
- Using strategy
rm Applied add-cube-cbrt0.9
\[\leadsto x + \color{blue}{\left(\left(\sqrt[3]{wj} \cdot \sqrt[3]{wj}\right) \cdot \sqrt[3]{wj}\right)} \cdot \left(wj - x \cdot 2\right)\]
Applied associate-*l*0.9
\[\leadsto x + \color{blue}{\left(\sqrt[3]{wj} \cdot \sqrt[3]{wj}\right) \cdot \left(\sqrt[3]{wj} \cdot \left(wj - x \cdot 2\right)\right)}\]
Simplified0.9
\[\leadsto x + \left(\sqrt[3]{wj} \cdot \sqrt[3]{wj}\right) \cdot \color{blue}{\left(\left(wj + x \cdot -2\right) \cdot \sqrt[3]{wj}\right)}\]
- Using strategy
rm Applied pow1/332.7
\[\leadsto x + \left(\sqrt[3]{wj} \cdot \color{blue}{{wj}^{\frac{1}{3}}}\right) \cdot \left(\left(wj + x \cdot -2\right) \cdot \sqrt[3]{wj}\right)\]
Applied pow1/332.7
\[\leadsto x + \left(\color{blue}{{wj}^{\frac{1}{3}}} \cdot {wj}^{\frac{1}{3}}\right) \cdot \left(\left(wj + x \cdot -2\right) \cdot \sqrt[3]{wj}\right)\]
Applied pow-prod-down1.2
\[\leadsto x + \color{blue}{{\left(wj \cdot wj\right)}^{\frac{1}{3}}} \cdot \left(\left(wj + x \cdot -2\right) \cdot \sqrt[3]{wj}\right)\]
if 3.03963131152792666e-12 < wj
Initial program 25.0
\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Simplified4.1
\[\leadsto \color{blue}{wj + \frac{\frac{x}{e^{wj}} - wj}{wj + 1}}\]
- Using strategy
rm Applied div-inv4.1
\[\leadsto wj + \frac{\color{blue}{x \cdot \frac{1}{e^{wj}}} - wj}{wj + 1}\]
Simplified4.0
\[\leadsto wj + \frac{x \cdot \color{blue}{e^{-wj}} - wj}{wj + 1}\]
- Recombined 2 regimes into one program.
Final simplification1.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;wj \le 3.03963131152792666 \cdot 10^{-12}:\\
\;\;\;\;x + {\left(wj \cdot wj\right)}^{\frac{1}{3}} \cdot \left(\left(wj + x \cdot -2\right) \cdot \sqrt[3]{wj}\right)\\
\mathbf{else}:\\
\;\;\;\;wj + \frac{x \cdot e^{-wj} - wj}{wj + 1}\\
\end{array}\]