- Split input into 2 regimes
if x < -3.7422431800629266e+28 or 173218.03867985317 < x
Initial program 60.0
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied frac-sub61.8
\[\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(1 + \frac{3}{x}\right) \cdot \left(\frac{-1}{x \cdot x}\right) + \left(\frac{-3}{x}\right))_*}\]
if -3.7422431800629266e+28 < x < 173218.03867985317
Initial program 1.7
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied frac-sub1.7
\[\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.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}{-(x \cdot 3 + 1)_*}}{\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 -3.7422431800629266 \cdot 10^{+28} \lor \neg \left(x \le 173218.03867985317\right):\\
\;\;\;\;(\left(1 + \frac{3}{x}\right) \cdot \left(\frac{-1}{x \cdot x}\right) + \left(\frac{-3}{x}\right))_*\\
\mathbf{else}:\\
\;\;\;\;\frac{-(x \cdot 3 + 1)_*}{\left(x - 1\right) \cdot \left(1 + x\right)}\\
\end{array}\]