- Split input into 2 regimes
if x < -11443.841380881175 or 14257.434820408032 < x
Initial program 59.3
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied div-inv59.4
\[\leadsto \color{blue}{x \cdot \frac{1}{x + 1}} - \frac{x + 1}{x - 1}\]
Taylor expanded around inf 0.3
\[\leadsto \color{blue}{-\left(3 \cdot \frac{1}{{x}^{3}} + \left(\frac{1}{{x}^{2}} + 3 \cdot \frac{1}{x}\right)\right)}\]
Simplified0.3
\[\leadsto \color{blue}{3 \cdot \left(\frac{\frac{-1}{x}}{x \cdot x} + \frac{-1}{x}\right) + \frac{-1}{x \cdot x}}\]
Taylor expanded around -inf 0.3
\[\leadsto \color{blue}{\left(-\left(3 \cdot \frac{1}{{x}^{3}} + 3 \cdot \frac{1}{x}\right)\right)} + \frac{-1}{x \cdot x}\]
Simplified0.0
\[\leadsto \color{blue}{\left(\frac{-3}{x} + \frac{-3}{x \cdot \left(x \cdot x\right)}\right)} + \frac{-1}{x \cdot x}\]
if -11443.841380881175 < x < 14257.434820408032
Initial program 0.1
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied div-inv0.1
\[\leadsto \color{blue}{x \cdot \frac{1}{x + 1}} - \frac{x + 1}{x - 1}\]
- Recombined 2 regimes into one program.
Final simplification0.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -11443.841380881175:\\
\;\;\;\;\frac{-1}{x \cdot x} + \left(\frac{-3}{\left(x \cdot x\right) \cdot x} + \frac{-3}{x}\right)\\
\mathbf{elif}\;x \le 14257.434820408032:\\
\;\;\;\;x \cdot \frac{1}{1 + x} - \frac{1 + x}{x - 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x \cdot x} + \left(\frac{-3}{\left(x \cdot x\right) \cdot x} + \frac{-3}{x}\right)\\
\end{array}\]