<s>[INST] Taylor series $\ln(1+e^x)$ about $x=0$ What's the best way to determine this up $x^3$ terms?
I thought it would be to take the series for $\ln(1+x)$ and the series for $e^x$ up to $x^3$ and sub the second series into the first. 
$$\ln(1+x) = x - \frac {x^2}{2} +\frac {x^3}{3} + \cdots$$
$$e^x = 1+ x + \frac {x^2}{2} +\frac {x^3}{6} + \cdots$$
This gave me $$\frac 5{6} + x + \frac {3x^2}{2} + \frac {2x^3}{3}$$ 
but this is not the answer in my book. help?
 [/INST] Your approach won't quite work because the argument of the logarithm in $\log(1+e^x)$ is not near $1$ at $x=0$ (it's near $2$ instead).  To fix this, note that
$$
\log(1+e^x)=\log 2 + \log\left(\frac{1}{2} + \frac{1}{2}e^x\right)=\log 2 + \log\left(1 + \frac{1}{2}x+\frac{1}{4}x^2 + \frac{1}{12}x^3+\ldots\right).
$$
Then use the Taylor series for the logarithm:
$$
\log 2 + \log\left(1 + \frac{1}{2}x+\frac{1}{4}x^2 + \frac{1}{12}x^3+\ldots\right)\\ = \log 2 + \left(\frac{1}{2}x+\frac{1}{4}x^2 + \frac{1}{12}x^3+\ldots\right) - \frac{1}{2}\left(\frac{1}{2}x+\frac{1}{4}x^2 +\ldots\right)^2 + \frac{1}{3}\left(\frac{1}{2}x + \ldots\right)^3 + \ldots \\
= \log 2 + \frac{1}{2}x + \left(\frac{1}{4}-\frac{1}{8}\right)x^2 + \left(\frac{1}{12}-\frac{1}{8}+\frac{1}{24}\right)x^3 + \ldots \\
= \log 2 + \frac{1}{2}x + \frac{1}{8}x^2 + O(x^4).
$$
</s>