\[\tan^{-1} \left(N + 1\right) - \tan^{-1} N\]
Test:
NMSE example 3.5
Bits:
128 bits
Bits error versus N
Time: 3.9 s
Input Error: 14.6
Output Error: 0.4
Log:
Profile: 🕒
\(\tan^{-1}_* \frac{1 - 0}{N \cdot N + \left(N + 1\right)}\)
  1. Started with
    \[\tan^{-1} \left(N + 1\right) - \tan^{-1} N\]
    14.6
  2. Using strategy rm
    14.6
  3. Applied diff-atan to get
    \[\color{red}{\tan^{-1} \left(N + 1\right) - \tan^{-1} N} \leadsto \color{blue}{\tan^{-1}_* \frac{\left(N + 1\right) - N}{1 + \left(N + 1\right) \cdot N}}\]
    13.6
  4. Applied simplify to get
    \[\tan^{-1}_* \frac{\color{red}{\left(N + 1\right) - N}}{1 + \left(N + 1\right) \cdot N} \leadsto \tan^{-1}_* \frac{\color{blue}{1 - 0}}{1 + \left(N + 1\right) \cdot N}\]
    0.4
  5. Using strategy rm
    0.4
  6. Applied add-cbrt-cube to get
    \[\tan^{-1}_* \frac{1 - 0}{1 + \color{red}{\left(N + 1\right) \cdot N}} \leadsto \tan^{-1}_* \frac{1 - 0}{1 + \color{blue}{\sqrt[3]{{\left(\left(N + 1\right) \cdot N\right)}^3}}}\]
    10.2
  7. Applied simplify to get
    \[\tan^{-1}_* \frac{1 - 0}{1 + \sqrt[3]{\color{red}{{\left(\left(N + 1\right) \cdot N\right)}^3}}} \leadsto \tan^{-1}_* \frac{1 - 0}{1 + \sqrt[3]{\color{blue}{{\left(N + {N}^2\right)}^3}}}\]
    10.2
  8. Applied taylor to get
    \[\tan^{-1}_* \frac{1 - 0}{1 + \sqrt[3]{{\left(N + {N}^2\right)}^3}} \leadsto \tan^{-1}_* \frac{1 - 0}{1 + \left(N + {N}^2\right)}\]
    0.4
  9. Taylor expanded around 0 to get
    \[\tan^{-1}_* \frac{1 - 0}{1 + \color{red}{\left(N + {N}^2\right)}} \leadsto \tan^{-1}_* \frac{1 - 0}{1 + \color{blue}{\left(N + {N}^2\right)}}\]
    0.4
  10. Applied simplify to get
    \[\tan^{-1}_* \frac{1 - 0}{1 + \left(N + {N}^2\right)} \leadsto \tan^{-1}_* \frac{1 - 0}{N \cdot N + \left(N + 1\right)}\]
    0.4

  11. Applied final simplification

  12. Removed slow pow expressions

Original test:


(lambda ((N default))
  #:name "NMSE example 3.5"
  (- (atan (+ N 1)) (atan N))
  #:target
  (atan (/ 1 (+ 1 (* N (+ N 1))))))