- Split input into 2 regimes
if x < -11245.771677819655 or 10310.829037773878 < x
Initial program 59.3
\[\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 -11245.771677819655 < x < 10310.829037773878
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.1
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;x \le -11245.771677819655 \lor \neg \left(x \le 10310.829037773878\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}}\]