- Split input into 2 regimes
if wj < 4.663236460460694e-09
Initial program 13.0
\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Taylor expanded around 0 0.8
\[\leadsto \color{blue}{\left({wj}^{2} + x\right) - 2 \cdot \left(x \cdot wj\right)}\]
Simplified0.8
\[\leadsto \color{blue}{(wj \cdot \left((x \cdot -2 + wj)_*\right) + x)_*}\]
if 4.663236460460694e-09 < wj
Initial program 24.7
\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
- Using strategy
rm Applied div-sub24.7
\[\leadsto wj - \color{blue}{\left(\frac{wj \cdot e^{wj}}{e^{wj} + wj \cdot e^{wj}} - \frac{x}{e^{wj} + wj \cdot e^{wj}}\right)}\]
Simplified2.5
\[\leadsto wj - \left(\color{blue}{\frac{wj}{1 + wj}} - \frac{x}{e^{wj} + wj \cdot e^{wj}}\right)\]
- Using strategy
rm Applied distribute-rgt1-in2.5
\[\leadsto wj - \left(\frac{wj}{1 + wj} - \frac{x}{\color{blue}{\left(wj + 1\right) \cdot e^{wj}}}\right)\]
Applied associate-/r*2.5
\[\leadsto wj - \left(\frac{wj}{1 + wj} - \color{blue}{\frac{\frac{x}{wj + 1}}{e^{wj}}}\right)\]
- Recombined 2 regimes into one program.
Final simplification0.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;wj \le 4.663236460460694 \cdot 10^{-09}:\\
\;\;\;\;(wj \cdot \left((x \cdot -2 + wj)_*\right) + x)_*\\
\mathbf{else}:\\
\;\;\;\;wj - \left(\frac{wj}{wj + 1} - \frac{\frac{x}{wj + 1}}{e^{wj}}\right)\\
\end{array}\]