- Split input into 2 regimes
if x < -11140.591209162671 or 14803.2046941616954 < x
Initial program 59.3
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
Taylor expanded around inf 0.3
\[\leadsto \color{blue}{-\left(1 \cdot \frac{1}{{x}^{2}} + \left(3 \cdot \frac{1}{x} + 3 \cdot \frac{1}{{x}^{3}}\right)\right)}\]
Simplified0.0
\[\leadsto \color{blue}{\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}}\]
if -11140.591209162671 < x < 14803.2046941616954
Initial program 0.1
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
- Using strategy
rm Applied add-log-exp0.1
\[\leadsto \frac{x}{x + 1} - \color{blue}{\log \left(e^{\frac{x + 1}{x - 1}}\right)}\]
Applied add-log-exp0.1
\[\leadsto \color{blue}{\log \left(e^{\frac{x}{x + 1}}\right)} - \log \left(e^{\frac{x + 1}{x - 1}}\right)\]
Applied diff-log0.1
\[\leadsto \color{blue}{\log \left(\frac{e^{\frac{x}{x + 1}}}{e^{\frac{x + 1}{x - 1}}}\right)}\]
Simplified0.1
\[\leadsto \log \color{blue}{\left(e^{\frac{x}{x + 1} - \frac{x + 1}{x - 1}}\right)}\]
- Recombined 2 regimes into one program.
Final simplification0.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -11140.591209162671 \lor \neg \left(x \le 14803.2046941616954\right):\\
\;\;\;\;\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{x}{x + 1} - \frac{x + 1}{x - 1}}\right)\\
\end{array}\]