Use Stirling's formula to estimate the location and size of the largest term of the Taylor series of $e^x$ Use Stirling's formula to estimate the location and size of the largest term of the Taylor series of $e^x$. I don't know how to start. Thanks
 A: If you use Stirling approximation $$k!\approx \sqrt{2\pi k}\,\Big(\frac ke\Big)^k$$ you have $$A=\frac{x^k}{k!}\approx \frac{x^k}{\sqrt{2\pi k}\,\Big(\frac ke\Big)^k}$$ Consider that $k$ is continuous and compute the derivative with respect to $k$. This will give $$A'=-\frac{e^k k^{-k-\frac{3}{2}} x^k (-2 k \log (x)+2 k \log (k)+1)}{2 \sqrt{2 \pi }}$$ and this will cancel for $$-2 k \log (x)+2 k \log (k)+1=0 \tag 1$$ the solution of which being explicitely given in terms of Lambert function $$k=-\frac{1}{2 W\left(-\frac{1}{2 x}\right)}$$ which is defined for $x \geq \frac e2$.
If you cannot use Lambert function, solve equation $(1)$ using Newton method, searching for the zero of $$f(k)=-2 k \log (x)+2 k \log (k)+1$$ $$f'(k)=2 (\log (k)-\log (x)+1)$$ and, starting from a "reasonable" guess $k_0$, the iterates will be given by $$k_{n+1}=k_n-\frac{f(k_n)}{f'(k_n)}$$
For illustration purposes, let us try using $x=10$ and, being very lazy, let us use $k_0=5$. The successive iterates will then be $$k_1=14.6650$$ $$k_2=10.2431$$ $$k_3=9.51457$$ $$k_4=9.48663$$  $$k_5=9.48659$$ which is the solution for six significant figures.
Let us check  $$\frac{10^7}{7!}\approx 1984.13$$ $$\frac{10^8}{8!}\approx 2480.16$$ $$\frac{10^9}{9!}\approx 2755.73$$ $$\frac{10^{10}}{10!}\approx 2755.73$$ $$\frac{10^{11}}{11!}\approx 2505.21$$ $$\frac{10^{12}}{12!}\approx 2087.68$$ 
Using Lambert function approximation for small $y$ $$W(y)=y-y^2+\frac{3 y^3}{2}+O\left(y^4\right)$$ would have given $W(\frac{-1}{20})\approx -\frac{843}{16000}$, $k\approx \frac{8000}{843}=9.48992$
Edit
I took a long way and, as the OP noticed, the solution is almost $k\approx x$. Using $$k=-\frac{1}{2 W\left(-\frac{1}{2 x}\right)}$$ and considering that $x$ is large, a Taylor expansion gives $$k=x-\frac{1}{2}-\frac{1}{8 x}-\frac{1}{12 x^2}+O\left(\left(\frac{1}{x}\right)^3\right)$$
In fact, if we simply consider $$f(k)=-2 k \log (x)+2 k \log (k)+1$$ we can notice that $f(x)=1$ and that $$f(x-1)=2 (x-1) \log (x-1)-2 (x-1) \log (x)+1$$ is always negative as soon as $x \geq \frac e2$.
