Missing resimplify in lambert_w



Today, I had a long search for a subtle and small bug. 

I have found a further and easy extension to the integrator to get more
integrals for special functions. I have tried it and got nice results.

But then I have got a problem with the lambert_w function. The integrator loops
endlessly. 

I recognized that the integrator endlessly tries to integrate the expression
   
   ((%LAMBERT_W) ((MEXPT) $X 1))

and I was wondering why this is not simplified. Here another look at the
problem:

(%i5) :lisp (setq $form ($readonly))
lambert_w(x^1);
((%LAMBERT_W) ((MEXPT) $X 1))

Even a resimplify does not help:

(%i5) :lisp (resimplify $form)
((%LAMBERT_W SIMP) ((MEXPT) $X 1))

The reason is, that in the simplifier for the lambert_w function a resimplify of
the argument is missing. This would be the correct line of code:

  (setq x (resimplify (cadr x))) ; bug a resimplify is missing

The problem with the integrator shows how important it is, that every function
is able to simplify its arguments.

I will commit the change to the lambert_w function.

Dieter Kaiser