- Split input into 2 regimes
if x < -54014889895523304.0 or 40872809330317.07 < x
Initial program 60.4
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied frac-sub62.2
\[\leadsto \color{blue}{\frac{x \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(x + 1\right)}{\left(x + 1\right) \cdot \left(x - 1\right)}}\]
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.0
\[\leadsto \color{blue}{\left(\frac{-3}{x} - \frac{1}{x \cdot x}\right) + \frac{\frac{-3}{x}}{x \cdot x}}\]
if -54014889895523304.0 < x < 40872809330317.07
Initial program 1.1
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied frac-sub1.0
\[\leadsto \color{blue}{\frac{x \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(x + 1\right)}{\left(x + 1\right) \cdot \left(x - 1\right)}}\]
Taylor expanded around 0 0.0
\[\leadsto \frac{\color{blue}{-\left(3 \cdot x + 1\right)}}{\left(x + 1\right) \cdot \left(x - 1\right)}\]
Simplified0.0
\[\leadsto \frac{\color{blue}{-1 - 3 \cdot x}}{\left(x + 1\right) \cdot \left(x - 1\right)}\]
- Using strategy
rm Applied flip-+0.0
\[\leadsto \frac{-1 - 3 \cdot x}{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x - 1}} \cdot \left(x - 1\right)}\]
Applied associate-*l/0.0
\[\leadsto \frac{-1 - 3 \cdot x}{\color{blue}{\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \left(x - 1\right)}{x - 1}}}\]
Applied associate-/r/0.0
\[\leadsto \color{blue}{\frac{-1 - 3 \cdot x}{\left(x \cdot x - 1 \cdot 1\right) \cdot \left(x - 1\right)} \cdot \left(x - 1\right)}\]
- Recombined 2 regimes into one program.
Final simplification0.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -54014889895523304.0 \lor \neg \left(x \le 40872809330317.07\right):\\
\;\;\;\;\left(\frac{-3}{x} - \frac{1}{x \cdot x}\right) + \frac{\frac{-3}{x}}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 - x \cdot 3}{\left(x \cdot x - 1\right) \cdot \left(x - 1\right)} \cdot \left(x - 1\right)\\
\end{array}\]