- Split input into 2 regimes
if x < -0.99081168843845 or 11157.565510823717 < x
Initial program 59.1
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied add-cbrt-cube60.2
\[\leadsto \frac{x}{x + 1} - \frac{x + 1}{\color{blue}{\sqrt[3]{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right) \cdot \left(x - 1\right)}}}\]
Applied add-cbrt-cube61.1
\[\leadsto \frac{x}{x + 1} - \frac{\color{blue}{\sqrt[3]{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right) \cdot \left(x + 1\right)}}}{\sqrt[3]{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right) \cdot \left(x - 1\right)}}\]
Applied cbrt-undiv61.1
\[\leadsto \frac{x}{x + 1} - \color{blue}{\sqrt[3]{\frac{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right) \cdot \left(x + 1\right)}{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right) \cdot \left(x - 1\right)}}}\]
Taylor expanded around inf 0.5
\[\leadsto \color{blue}{-\left(3 \cdot \frac{1}{{x}^{3}} + \left(\frac{1}{{x}^{2}} + 3 \cdot \frac{1}{x}\right)\right)}\]
Simplified0.2
\[\leadsto \color{blue}{\left(\frac{-1}{x \cdot x} - \frac{3}{x}\right) - \frac{\frac{3}{x \cdot x}}{x}}\]
if -0.99081168843845 < x < 11157.565510823717
Initial program 0.0
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied add-sqr-sqrt0.1
\[\leadsto \frac{x}{\color{blue}{\sqrt{x + 1} \cdot \sqrt{x + 1}}} - \frac{x + 1}{x - 1}\]
Applied associate-/r*0.1
\[\leadsto \color{blue}{\frac{\frac{x}{\sqrt{x + 1}}}{\sqrt{x + 1}}} - \frac{x + 1}{x - 1}\]
- Recombined 2 regimes into one program.
Final simplification0.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -0.99081168843845:\\
\;\;\;\;\left(\frac{-1}{x \cdot x} - \frac{3}{x}\right) - \frac{\frac{3}{x \cdot x}}{x}\\
\mathbf{elif}\;x \le 11157.565510823717:\\
\;\;\;\;\frac{\frac{x}{\sqrt{1 + x}}}{\sqrt{1 + x}} - \frac{1 + x}{x - 1}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-1}{x \cdot x} - \frac{3}{x}\right) - \frac{\frac{3}{x \cdot x}}{x}\\
\end{array}\]