\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Test:
Jmat.Real.lambertw, newton loop step
Bits:
128 bits
Bits error versus wj
Bits error versus x
Time: 7.8 s
Input Error: 20.7
Output Error: 0.1
Log:
Profile: 🕒
\(\left({wj}^2 - {wj}^3\right) + \frac{x}{\left(wj + 1\right) \cdot e^{wj}}\)
  1. Started with
    \[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
    20.7
  2. Using strategy rm
    20.7
  3. Applied div-sub to get
    \[wj - \color{red}{\frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}} \leadsto wj - \color{blue}{\left(\frac{wj \cdot e^{wj}}{e^{wj} + wj \cdot e^{wj}} - \frac{x}{e^{wj} + wj \cdot e^{wj}}\right)}\]
    20.7
  4. Applied simplify to get
    \[wj - \left(\color{red}{\frac{wj \cdot e^{wj}}{e^{wj} + wj \cdot e^{wj}}} - \frac{x}{e^{wj} + wj \cdot e^{wj}}\right) \leadsto wj - \left(\color{blue}{\frac{wj}{wj + 1}} - \frac{x}{e^{wj} + wj \cdot e^{wj}}\right)\]
    20.6
  5. Applied simplify to get
    \[wj - \left(\frac{wj}{wj + 1} - \color{red}{\frac{x}{e^{wj} + wj \cdot e^{wj}}}\right) \leadsto wj - \left(\frac{wj}{wj + 1} - \color{blue}{\frac{\frac{x}{1 + wj}}{e^{wj}}}\right)\]
    20.6
  6. Applied taylor to get
    \[wj - \left(\frac{wj}{wj + 1} - \frac{\frac{x}{1 + wj}}{e^{wj}}\right) \leadsto wj - \left(\left(\left({wj}^{3} + wj\right) - {wj}^2\right) - \frac{\frac{x}{1 + wj}}{e^{wj}}\right)\]
    11.2
  7. Taylor expanded around 0 to get
    \[wj - \left(\color{red}{\left(\left({wj}^{3} + wj\right) - {wj}^2\right)} - \frac{\frac{x}{1 + wj}}{e^{wj}}\right) \leadsto wj - \left(\color{blue}{\left(\left({wj}^{3} + wj\right) - {wj}^2\right)} - \frac{\frac{x}{1 + wj}}{e^{wj}}\right)\]
    11.2
  8. Applied simplify to get
    \[\color{red}{wj - \left(\left(\left({wj}^{3} + wj\right) - {wj}^2\right) - \frac{\frac{x}{1 + wj}}{e^{wj}}\right)} \leadsto \color{blue}{\left({wj}^2 - {wj}^3\right) + \frac{x}{\left(wj + 1\right) \cdot e^{wj}}}\]
    0.1

Original test:


(lambda ((wj default) (x default))
  #:name "Jmat.Real.lambertw, newton loop step"
  (- wj (/ (- (* wj (exp wj)) x) (+ (exp wj) (* wj (exp wj)))))
  #:target
  (- wj (- (/ wj (+ wj 1)) (/ x (+ (exp wj) (* wj (exp wj)))))))