- Split input into 2 regimes
if x < -12389.068644457413 or 12781.61500221245 < x
Initial program 59.4
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
Taylor expanded around inf 0.3
\[\leadsto \color{blue}{-\left(3 \cdot \frac{1}{{x}^{3}} + \left(3 \cdot \frac{1}{x} + \frac{1}{{x}^{2}}\right)\right)}\]
Applied simplify0.0
\[\leadsto \color{blue}{\frac{-3}{x} - \frac{1 + \frac{3}{x}}{x \cdot x}}\]
if -12389.068644457413 < x < 12781.61500221245
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}}\]
- Recombined 2 regimes into one program.
Applied simplify0.0
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;x \le -12389.068644457413 \lor \neg \left(x \le 12781.61500221245\right):\\
\;\;\;\;\left(-\frac{3}{x}\right) - \frac{1 + \frac{3}{x}}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + x} - \left(1 + x\right) \cdot \frac{1}{x - 1}\\
\end{array}}\]