\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
Test:
NMSE example 3.6
Bits:
128 bits
Bits error versus x
Time: 7.2 s
Input Error: 19.8
Output Error: 0.7
Log:
Profile: 🕒
\(\frac{1}{\sqrt{1 + x} \cdot x + \sqrt{x} \cdot \left(1 + x\right)}\)
  1. Started with
    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
    19.8
  2. Using strategy rm
    19.8
  3. Applied frac-sub to get
    \[\color{red}{\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}} \leadsto \color{blue}{\frac{1 \cdot \sqrt{x + 1} - \sqrt{x} \cdot 1}{\sqrt{x} \cdot \sqrt{x + 1}}}\]
    19.8
  4. Applied simplify to get
    \[\frac{\color{red}{1 \cdot \sqrt{x + 1} - \sqrt{x} \cdot 1}}{\sqrt{x} \cdot \sqrt{x + 1}} \leadsto \frac{\color{blue}{\sqrt{1 + x} - \sqrt{x}}}{\sqrt{x} \cdot \sqrt{x + 1}}\]
    19.8
  5. Using strategy rm
    19.8
  6. Applied flip-- to get
    \[\frac{\color{red}{\sqrt{1 + x} - \sqrt{x}}}{\sqrt{x} \cdot \sqrt{x + 1}} \leadsto \frac{\color{blue}{\frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\sqrt{1 + x} + \sqrt{x}}}}{\sqrt{x} \cdot \sqrt{x + 1}}\]
    19.6
  7. Applied associate-/l/ to get
    \[\color{red}{\frac{\frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\sqrt{1 + x} + \sqrt{x}}}{\sqrt{x} \cdot \sqrt{x + 1}}} \leadsto \color{blue}{\frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\left(\sqrt{x} \cdot \sqrt{x + 1}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}}\]
    19.6
  8. Applied simplify to get
    \[\frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\color{red}{\left(\sqrt{x} \cdot \sqrt{x + 1}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} \leadsto \frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\color{blue}{\sqrt{x} \cdot \left(x + 1\right) + x \cdot \sqrt{x + 1}}}\]
    19.6
  9. Applied taylor to get
    \[\frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\sqrt{x} \cdot \left(x + 1\right) + x \cdot \sqrt{x + 1}} \leadsto \frac{\left(1 + x\right) - {\left(\sqrt{x}\right)}^2}{\sqrt{x} \cdot \left(x + 1\right) + x \cdot \sqrt{x + 1}}\]
    19.6
  10. Taylor expanded around 0 to get
    \[\frac{\color{red}{\left(1 + x\right)} - {\left(\sqrt{x}\right)}^2}{\sqrt{x} \cdot \left(x + 1\right) + x \cdot \sqrt{x + 1}} \leadsto \frac{\color{blue}{\left(1 + x\right)} - {\left(\sqrt{x}\right)}^2}{\sqrt{x} \cdot \left(x + 1\right) + x \cdot \sqrt{x + 1}}\]
    19.6
  11. Applied simplify to get
    \[\frac{\left(1 + x\right) - {\left(\sqrt{x}\right)}^2}{\sqrt{x} \cdot \left(x + 1\right) + x \cdot \sqrt{x + 1}} \leadsto \frac{1}{\sqrt{1 + x} \cdot x + \sqrt{x} \cdot \left(1 + x\right)}\]
    0.7

  12. Applied final simplification

  13. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE example 3.6"
  (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))
  #:target
  (/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1))))))