\[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
Test:
NMSE problem 3.3.3
Bits:
128 bits
Bits error versus x
Time: 7.3 s
Input Error: 4.3
Output Error: 0.1
Log:
Profile: 🕒
\(\frac{\frac{2}{1 + x}}{x \cdot \left(x - 1\right)}\)
  1. Started with
    \[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
    4.3
  2. Using strategy rm
    4.3
  3. Applied sub-neg to get
    \[\color{red}{\left(\frac{1}{x + 1} - \frac{2}{x}\right)} + \frac{1}{x - 1} \leadsto \color{blue}{\left(\frac{1}{x + 1} + \left(-\frac{2}{x}\right)\right)} + \frac{1}{x - 1}\]
    4.3
  4. Applied associate-+l+ to get
    \[\color{red}{\left(\frac{1}{x + 1} + \left(-\frac{2}{x}\right)\right) + \frac{1}{x - 1}} \leadsto \color{blue}{\frac{1}{x + 1} + \left(\left(-\frac{2}{x}\right) + \frac{1}{x - 1}\right)}\]
    4.3
  5. Using strategy rm
    4.3
  6. Applied distribute-neg-frac to get
    \[\frac{1}{x + 1} + \left(\color{red}{\left(-\frac{2}{x}\right)} + \frac{1}{x - 1}\right) \leadsto \frac{1}{x + 1} + \left(\color{blue}{\frac{-2}{x}} + \frac{1}{x - 1}\right)\]
    4.3
  7. Applied frac-add to get
    \[\frac{1}{x + 1} + \color{red}{\left(\frac{-2}{x} + \frac{1}{x - 1}\right)} \leadsto \frac{1}{x + 1} + \color{blue}{\frac{\left(-2\right) \cdot \left(x - 1\right) + x \cdot 1}{x \cdot \left(x - 1\right)}}\]
    11.9
  8. Applied frac-add to get
    \[\color{red}{\frac{1}{x + 1} + \frac{\left(-2\right) \cdot \left(x - 1\right) + x \cdot 1}{x \cdot \left(x - 1\right)}} \leadsto \color{blue}{\frac{1 \cdot \left(x \cdot \left(x - 1\right)\right) + \left(x + 1\right) \cdot \left(\left(-2\right) \cdot \left(x - 1\right) + x \cdot 1\right)}{\left(x + 1\right) \cdot \left(x \cdot \left(x - 1\right)\right)}}\]
    11.8
  9. Applied taylor to get
    \[\frac{1 \cdot \left(x \cdot \left(x - 1\right)\right) + \left(x + 1\right) \cdot \left(\left(-2\right) \cdot \left(x - 1\right) + x \cdot 1\right)}{\left(x + 1\right) \cdot \left(x \cdot \left(x - 1\right)\right)} \leadsto \frac{2}{\left(x + 1\right) \cdot \left(x \cdot \left(x - 1\right)\right)}\]
    0.4
  10. Taylor expanded around 0 to get
    \[\frac{\color{red}{2}}{\left(x + 1\right) \cdot \left(x \cdot \left(x - 1\right)\right)} \leadsto \frac{\color{blue}{2}}{\left(x + 1\right) \cdot \left(x \cdot \left(x - 1\right)\right)}\]
    0.4
  11. Applied simplify to get
    \[\frac{2}{\left(x + 1\right) \cdot \left(x \cdot \left(x - 1\right)\right)} \leadsto \frac{\frac{2}{1 + x}}{x \cdot \left(x - 1\right)}\]
    0.1

  12. Applied final simplification

  13. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE problem 3.3.3"
  (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1)))
  #:target
  (/ 2 (* x (- (sqr x) 1))))