- Split input into 2 regimes
if x < -0.9933408418278237 or 13973.283901258525 < x
Initial program 58.7
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied add-exp-log59.4
\[\leadsto \color{blue}{e^{\log \left(\frac{x}{x + 1} - \frac{x + 1}{x - 1}\right)}}\]
Taylor expanded around inf 0.6
\[\leadsto \color{blue}{-\left(1 \cdot \frac{1}{{x}^{2}} + \left(3 \cdot \frac{1}{x} + 3 \cdot \frac{1}{{x}^{3}}\right)\right)}\]
Simplified0.2
\[\leadsto \color{blue}{\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}}\]
if -0.9933408418278237 < x < 13973.283901258525
Initial program 0.1
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied div-inv0.1
\[\leadsto \frac{x}{x + 1} - \color{blue}{\left(x + 1\right) \cdot \frac{1}{x - 1}}\]
- Using strategy
rm Applied flip3-+0.1
\[\leadsto \frac{x}{x + 1} - \color{blue}{\frac{{x}^{3} + {1}^{3}}{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}} \cdot \frac{1}{x - 1}\]
Applied associate-*l/0.1
\[\leadsto \frac{x}{x + 1} - \color{blue}{\frac{\left({x}^{3} + {1}^{3}\right) \cdot \frac{1}{x - 1}}{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}\]
Applied frac-sub0.1
\[\leadsto \color{blue}{\frac{x \cdot \left(x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)\right) - \left(x + 1\right) \cdot \left(\left({x}^{3} + {1}^{3}\right) \cdot \frac{1}{x - 1}\right)}{\left(x + 1\right) \cdot \left(x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)\right)}}\]
Simplified0.1
\[\leadsto \frac{\color{blue}{{x}^{3} + \left(x \cdot \left(1 \cdot 1 - x \cdot 1\right) - \frac{{x}^{3} + {1}^{3}}{x - 1} \cdot \left(x + 1\right)\right)}}{\left(x + 1\right) \cdot \left(x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)\right)}\]
Simplified0.1
\[\leadsto \frac{{x}^{3} + \left(x \cdot \left(1 \cdot 1 - x \cdot 1\right) - \frac{{x}^{3} + {1}^{3}}{x - 1} \cdot \left(x + 1\right)\right)}{\color{blue}{\left(1 \cdot \left(1 - x\right) + {x}^{2}\right) \cdot \left(x + 1\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt0.1
\[\leadsto \frac{{x}^{3} + \left(x \cdot \left(1 \cdot 1 - x \cdot 1\right) - \frac{{x}^{3} + {1}^{3}}{x - 1} \cdot \left(x + 1\right)\right)}{\color{blue}{\sqrt{\left(1 \cdot \left(1 - x\right) + {x}^{2}\right) \cdot \left(x + 1\right)} \cdot \sqrt{\left(1 \cdot \left(1 - x\right) + {x}^{2}\right) \cdot \left(x + 1\right)}}}\]
- Recombined 2 regimes into one program.
Final simplification0.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -0.993340841827823673 \lor \neg \left(x \le 13973.283901258525\right):\\
\;\;\;\;\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{x}^{3} + \left(x \cdot \left(1 \cdot 1 - x \cdot 1\right) - \frac{{x}^{3} + {1}^{3}}{x - 1} \cdot \left(x + 1\right)\right)}{\sqrt{\left(1 \cdot \left(1 - x\right) + {x}^{2}\right) \cdot \left(x + 1\right)} \cdot \sqrt{\left(1 \cdot \left(1 - x\right) + {x}^{2}\right) \cdot \left(x + 1\right)}}\\
\end{array}\]