I have been reading a book on approximating $e$ and there is a couple lines that I am stuck on. Here they are:
$x$ln$(1+\displaystyle\frac{1}{x}) = 1 - \displaystyle\frac{1}{2x} + \displaystyle\frac{1}{3x^2} - \displaystyle\frac{1}{4x^3} + ...$
Exponentiating each side and collecting the same powers of $\displaystyle\frac{1}{x}$ with the help of the Maclaurin series of $e^x$ we find that,
$(1 + \displaystyle\frac{1}{x})^x = e(1 - \displaystyle\frac{1}{2x} + \displaystyle\frac{11}{24x^2} - \displaystyle\frac{7}{16x^3} + \displaystyle\frac{2447}{5760x^4} - \displaystyle\frac{959}{2304x^5} + ...)$
I am not sure how they went about going from the first term which makes sense to me to the second term with some pretty random numbers. I would appreciate the help and filling in the details that I do not get.
The idea is this: we know that $x \log (1 + x^{-1}) = \log (1+x^{-1})^x$. Now exponentiating both sides gives $$(1+x^{-1})^x = \exp \left(1 - \frac{1}{2x} + \frac{1}{3x^2} - \frac{1}{4x^3} + \cdots \right) = e \cdot e^{-1/2x} \cdot e^{1/3x^2} \cdot e^{-1/4x^3} \cdots.$$ Now consider each factor separately: $$\exp \frac{1}{(k+1)(-x)^k} = \sum_{n=0}^\infty \frac{1}{n!} \left( (k+1)(-x)^k \right)^{-n}. $$ Excluding the first constant factor $e$ in the infinite product, they expand $e^{-1/2x}$, $e^{1/3x^2}$, etc. and multiply out all those expansions. That's computationally tedious but it is not too bad to get the first few terms this way, because if you want to get the $m^{\rm th}$ term of the original series expansion, then you only need $n_{\rm max} = \lfloor m/k \rfloor$ terms for the $k^{\rm th}$ exponential series expansion. So for instance, if I want up to the $x^{-3}$ term for the original series, the first few exponential expansions are $$\begin{align*} e^{-1/2x} &= 1 - \frac{1}{2x} + \frac{1}{8x^2} - \frac{1}{48x^3} + \cdots, \\ e^{1/3x^2} &= 1 + \frac{1}{3x^2} + \cdots, \\ e^{-1/4x^3} &= 1 - \frac{1}{4x^3} + \cdots. \end{align*}$$ I don't need any more terms because all of them will be smaller than $x^{-3}$. Then I take the product, ignoring any subproducts smaller than $x^{-3}$, which is easily done by hand. Of course, if you want higher order terms, this is best left to a computer.
Per the OP's request. Pay careful attention to how we discard any intermediate products that are of higher order than $x^{-3}$:
$$\begin{align*} e^{-1/2x}e^{1/3x^2}e^{-1/4x^3} &= \left(1 - \tfrac{1}{2x} + \tfrac{1}{8x^2} - \tfrac{1}{48x^3} + \cdots \right)\left(1 + \tfrac{1}{3x^2} + \cdots \right)\left(1 - \tfrac{1}{4x^3} + \cdots \right) \\ &= \left(1 - \tfrac{1}{2x} + \tfrac{1}{8x^2} - \tfrac{1}{48x^3} + \cdots \right)\left(1 + \tfrac{1}{3x^2} - \tfrac{1}{4x^3} + \cdots \right) \\ &= 1-\tfrac{1}{2x}+\tfrac{1}{8x^2}+\tfrac{1}{3x^2}-\tfrac{1}{48x^3}-\tfrac{1}{6x^3}-\tfrac{1}{4x^3}+\cdots \\ &= 1 - \tfrac{1}{2x} + \tfrac{11}{24x^2} - \tfrac{7}{16x^3} + \cdots. \end{align*}$$