- Split input into 2 regimes
if (- (/ 1 (+ x 1)) (/ 1 (- x 1))) < 4.5082903407156913e-131
Initial program 28.5
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
Taylor expanded around inf 1.0
\[\leadsto \color{blue}{-\left(2 \cdot \frac{1}{{x}^{6}} + \left(2 \cdot \frac{1}{{x}^{4}} + 2 \cdot \frac{1}{{x}^{2}}\right)\right)}\]
Applied simplify1.0
\[\leadsto \color{blue}{\left(\frac{-2}{x \cdot x} + \frac{-2}{{x}^{6}}\right) - \frac{2}{{x}^{4}}}\]
- Using strategy
rm Applied associate-/r*0.3
\[\leadsto \left(\color{blue}{\frac{\frac{-2}{x}}{x}} + \frac{-2}{{x}^{6}}\right) - \frac{2}{{x}^{4}}\]
if 4.5082903407156913e-131 < (- (/ 1 (+ x 1)) (/ 1 (- x 1)))
Initial program 0.0
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
- Using strategy
rm Applied flip3--0.0
\[\leadsto \frac{1}{x + 1} - \frac{1}{\color{blue}{\frac{{x}^{3} - {1}^{3}}{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}}}\]
Applied associate-/r/0.0
\[\leadsto \frac{1}{x + 1} - \color{blue}{\frac{1}{{x}^{3} - {1}^{3}} \cdot \left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right)}\]
Applied add-cube-cbrt0.0
\[\leadsto \color{blue}{\left(\sqrt[3]{\frac{1}{x + 1}} \cdot \sqrt[3]{\frac{1}{x + 1}}\right) \cdot \sqrt[3]{\frac{1}{x + 1}}} - \frac{1}{{x}^{3} - {1}^{3}} \cdot \left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right)\]
Applied prod-diff0.0
\[\leadsto \color{blue}{(\left(\sqrt[3]{\frac{1}{x + 1}} \cdot \sqrt[3]{\frac{1}{x + 1}}\right) \cdot \left(\sqrt[3]{\frac{1}{x + 1}}\right) + \left(-\left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right) \cdot \frac{1}{{x}^{3} - {1}^{3}}\right))_* + (\left(-\left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right)\right) \cdot \left(\frac{1}{{x}^{3} - {1}^{3}}\right) + \left(\left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right) \cdot \frac{1}{{x}^{3} - {1}^{3}}\right))_*}\]
Applied simplify0.0
\[\leadsto \color{blue}{\left(\frac{1}{x + 1} - \frac{x + (x \cdot x + 1)_*}{(x \cdot \left(x \cdot x\right) + \left(-1\right))_*}\right)} + (\left(-\left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right)\right) \cdot \left(\frac{1}{{x}^{3} - {1}^{3}}\right) + \left(\left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right) \cdot \frac{1}{{x}^{3} - {1}^{3}}\right))_*\]
Applied simplify0.0
\[\leadsto \left(\frac{1}{x + 1} - \frac{x + (x \cdot x + 1)_*}{(x \cdot \left(x \cdot x\right) + \left(-1\right))_*}\right) + \color{blue}{0}\]
- Recombined 2 regimes into one program.
Applied simplify0.2
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;\frac{1}{x + 1} - \frac{1}{x - 1} \le 4.5082903407156913 \cdot 10^{-131}:\\
\;\;\;\;\left(-\left(\frac{2}{{x}^{6}} + \frac{\frac{2}{x}}{x}\right)\right) - \frac{2}{{x}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x + 1} - \frac{(x \cdot x + 1)_* + x}{(x \cdot \left(x \cdot x\right) + \left(-1\right))_*}\\
\end{array}}\]