neilparker62 said:
Well I tried working backwards from the given solution:
$$r=\frac{M}{P}+\frac{W\left(\frac{-MT}{P}e^{\frac{MT}{P}}\right)}{T}$$
$$T\left(r-\frac{M}{P}\right)=W\left(\frac{-MT}{P}e^{\frac{MT}{P}}\right)$$
$$T\left(r-\frac{M}{P}\right)e^{T\left(r-\frac{M}{P}\right)}=\frac{-MT}{P}$$
$$\cancel{T}\left(\frac{M-rP}{\cancel P}\right)e^{T\left(r-\frac{M}{P}\right)}=\frac{M \cancel T}{\cancel P}$$
$$P=\frac{M}{r}\left(1-e^{-T\left(r-\frac{M}{P}\right)}\right)$$ Should get $$P=\frac{M}{r}\left(1-e^{-rT}\right)$$ so "close but no cigar" is all I can say! What am I missing ?
##P - \dfrac{M}{r} \left ( 1 - e^{-Tr} \right ) = 0##
##P = \dfrac{M}{r} \left ( 1 - e^{-Tr} \right )##
##\dfrac{P}{M} r = 1 - e^{-Tr}##
##\dfrac{P}{M} r e^{Tr} = e^{Tr} - 1##
##\left ( \dfrac{P}{M} r - 1 \right ) e^{Tr} = - 1##
##\dfrac{M}{P} T \left ( \dfrac{P}{M} r - 1 \right ) e^{Tr} = - \dfrac{M}{P} T##
##\left (T r - \dfrac{M}{P} T \right ) e^{Tr} = - \dfrac{M}{P} T##
##\left (T r - \dfrac{M}{P} T \right ) e^{Tr - (M/P)T} = - \dfrac{M}{P} T e^{-(M/P)T}##
Now, we would like to take the Lambert function of both sides, but we need to make sure that the argument is greater than -1/e. This is where the ##W_n## comes in. We take the nth branch of the W function, (where, honestly, n is an integer that I don't know how to find):
##W_n \left ( \left (T r - \dfrac{M}{P} T \right ) e^{Tr - (M/P)T} \right )= W_n \left ( - \dfrac{M}{P} T e^{-(M/P)T} \right )##
##T r - \dfrac{M}{P} T = W_n \left ( - \dfrac{M}{P} T e^{-(M/P)T} \right )##
So
##r = \dfrac{1}{T} \left ( \dfrac{M}{P} T + W_n \left ( - \dfrac{M}{P} T e^{-(M/P)T} \right ) \right )##
##r = \dfrac{M}{P} + \dfrac{1}{T} W_n \left ( - \dfrac{M}{P} T e^{-(M/P)T} \right )##
-Dan