I am trying to simulate the following distribution, with pdf given by:
$$f(t) = \frac{2 \mu (1-\rho) e^{-2 \mu t} (1+\mu \rho t) \left(\rho ^{K+1} e^{\mu t}-\rho ^2 \left(e^{\mu t}-1\right)+\mu (1-\rho) \rho t-1\right)}{\left(1-\rho ^{K+1}\right)^2}$$
and cdf
$$F(t)= \frac{(1-\rho) \left(\rho -e^{-\mu t} (\rho +\mu \rho t+1)+1\right)}{1-\rho ^{K+1}},\ \ t >0,\ \rho < 1,\ \ K \gt 0$$.
I am aware that to simulate this, I need to find $F^{-1}(u)$, which is
$$F^{-1}(u) = \frac{\rho W\left(\frac{e^{-(1+\frac{1}{\rho })} \left(-u \rho ^{K+1}+\rho ^2+u-1\right)}{(1-\rho) \rho }\right)+\rho +1}{\mu \rho }$$,
which is (I believe) the Lambert-$W$ function.
The question is that I am unclear how to proceed next. Any help would be appreciated.