I am trying to integrate this function...
$$\int_0^{\tau } \frac{e^{-x}}{\left(1-\lambda e^{-x} (x+1)\right)^2} \, dx$$
When this integral is numerically evaluated when $\lambda = 0.1$, $\tau = 1.0$, the value is 0.766676
To find a closed form, I am using the change of variable technique.
So, here I let
$$u=1-\lambda e^{-x} (x+1),$$
then
$$d u = \lambda (e^{-x} (x+1)-\lambda e^{-x})d x$$
and
$$x = -W\left(\frac{u-1}{\lambda e }\right)-1$$.
Plugging everything back in, I get
$$I = \int_0^{\tau } \frac{e^{-x}}{\left(1-\lambda e^{-x} (x+1)\right)^2} \, dx $$
$$= \int_{1 - \lambda]}^{1-\lambda e^{-\tau } (\tau +1) }\frac{e^{-\left(-W\left(\frac{u-1}{e \lambda }\right)-1\right)}}{u^2 \left(\lambda e^{-\left(-W\left(\frac{u-1}{e \lambda }\right)-1\right)} \left(\left(-W\left(\frac{u-1}{e \lambda }\right)-1\right)+1\right)-\lambda e^{-\left(-W\left(\frac{u-1}{e \lambda }\right)-1\right)}\right)}du$$
$$= \int_{1 - \lambda]}^{1-\lambda e^{-\tau } (\tau +1) }\frac{e^{W\left(\frac{u-1}{e \lambda }\right)+1}}{u^2 \left(-\lambda e^{W\left(\frac{u-1}{e \lambda }\right)+1}-u+1\right)} du$$
where the bounds of integration are:
$$lb = 1-\lambda$$ $$ub = 1-\lambda e^{-\tau } (\tau +1)$$
The problem is that when I numerically evaluate this function with the same parameters as above, I do not get the same results.
So, something must be wrong.
Appreciate the feedback...
Hint: Denominator of the last equality must be $u^2 (-\lambda^2 e^{W\left(\frac{u-1}{e \lambda }\right)+1} -u +1)$. Substitution of $dx$ in terms of $du$ is where the problem arised, check it again.