It is well known that $e = \lim_{x \rightarrow +\infty} (1+1/x)^x$, which means $\forall \epsilon > 0$, $\exists M>0$ such as $x > M \Rightarrow |(1+1/x)^x - e| < \epsilon$.
I would like to know what would be $M$ in function of $\epsilon$. I've made some attempts and it seems that $M = e/\epsilon$ works fine, but I could not prove it.
In other words, I'm interested in, given the maximum error tolerance $\epsilon$, after which point $M$, I can use $e$ instead of $(1+x)^x$.
$\begin{array}\\ x\ln(1+1/x) &=x(1/x-1/(2x^2)+1/(3x^3)+O(1/x^4))\\ &=1-1/(2x)+1/(3x^2)+O(1/x^3)\\ \text{so}\\ x\ln(1+1/x)-1 &=-1/(2x)+1/(3x^2)+O(1/x^3)\\ \text{so}\\ (1+1/x)^x/e &=e^{x\ln(1+1/x)-1}\\ &=e^{-1/(2x)+1/(3x^2)+O(1/x^3)}\\ &=e^{-1/(2x)}e^{1/(3x^2)}e^{O(1/x^3)}\\ &=(1-1/(2x)+1/(8x^2)+O(1/x^3))(1+1/(3x^2)+O(1/x^4))(1+O(1/x^3))\\ &=1-1/(2x)+(1/8+1/3)/x^2+O(1/x^3)\\ &=1-1/(2x)+(11/24)/x^2+O(1/x^3)\\ \text{so}\\ (1+1/x)^x &=e-e/(2x)+(11e/24)/x^2+O(1/x^3)\\ \text{so}\\ (1+1/x)^x-e &=-e/(2x)+(11e/24)/x^2+O(1/x^3)\\ \end{array} $
Note: as is often the case in my answers, nothing original here.
Note 2: Wolfy agrees and says that $(1+1/x)^x-e =-e/(2 x) + (11 e)/(24 x^2) - (7 e)/(16 x^3) + (2447 e)/(5760 x^4) + O((1/x)^5) $.