For $0\le m\le M$, let $p$ satisfy $\left(1-\frac1M\right)^m(1-p)=\frac1e-\frac1M$. Why is it that $p=O\left(\frac{M-m}{M}\right)$? For $M$ large enough, by taking logarithms and Taylor series, it can be checked that 
$$\left(1-\frac1M\right)^M \ge \frac1e - \frac1M$$ 
For $0\le m\le M$, let $p$ be a parameter satisfying 
$$\left(1-\frac1M\right)^m(1-p)= \frac1e - \frac1M$$
Someone claims 
$$p=O\left(\frac{M-m}{M}\right)$$
I am wondering why it is true?
**Further information: ** we can assume $M, m$ are nonnegative integers and $m<M$.
 A: First, note that you need to assume $m<M$. Otherwise, if $m=M$ then $\frac{M-m}{M}=0$ and the condition cannot be satisfied.
Elementary manipulations yield
$$
p = 1 - \frac{1}{e(1-1/M)^m} + \frac{1}{M(1-1/M)^m}.
$$
Now, $\log(1-1/M)$ is asymptotically equivalent to the reciprocal of the derivative of $\log(M-1)$. That is,
$$
\log(1-1/M)=\log((M-1)/M)=-\log(M)+\log(M-1) = -\log(M/(M-1)) \approx {-1/(M-1)}.
$$
So $(1-1/M)^m\approx \exp\left(-\frac{m}{M-1}\right).$
Thus, it suffices to analyze the asymptotic behaviour of
$$
1 - \frac{\exp\left(\frac{m}{M-1}\right)}{e} + \frac{\exp\left(\frac{m}{M-1}\right)}{M} 
$$
$$
= \frac{Me-M\exp\left(\frac{m}{M-1}\right) + \exp\left(\frac{m}{M-1}+1\right)}{Me} 
$$
$$
= \frac{M-M\exp\left(\frac{m}{M-1}-1\right) + \exp\left(\frac{m}{M-1}\right)}{M} .
$$
Now observe that for $0\leq m \leq M-1$, it is
$$
\frac{M}{e}-1 \leq M\exp\left(\frac{m}{M-1}-1\right) - \exp\left(\frac{m}{M-1}\right) \leq M-e.
$$
Thus, $M\exp\left(\frac{m}{M-1}-1\right) - \exp\left(\frac{m}{M-1}\right)=\Theta(M)$, which implies $m=O\left(M\exp\left(\frac{m}{M-1}-1\right) - \exp\left(\frac{m}{M-1}\right)\right)$. This, in turn, implies the result.
A: Using the inequality $1+x\le e^x$ for all $x\in\mathbb{R}$ twice and $m<M$ are integers, we have
\begin{align}
p&=1-\frac{e^{-1}-M^{-1}}{(1-1/M)^m}\\
&\le 1-\frac{e^{-1}-M^{-1}}{e^{-m/M}}=\frac{M-e^{m/M-1}M+e^{m/M}}{M}\\
&\le \frac{M-(1+m/M-1)M+e^{m/M}}{M}\\
&=\frac{M-m+e^{m/M}}{M}=O(\frac{M-m}{M}).
\end{align}
