<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] A standard way to obtain the Taylor series about $0$ is
$$\sum_{k=0}^{\infty} \dfrac{f^{(k)}(0)}{k!}\cdot x^k$$
Since $f(x) = \log(1+e^x)$, we have
$$f(0) = \log(1+e^0) = \log(2)$$
$$f'(0) = \left.\dfrac{e^x}{1+e^x} \right \vert_{x=0} = \dfrac12$$
$$f''(0) = \left.\dfrac{e^x}{(1+e^x)^2} \right \vert_{x=0} = \dfrac14$$
$$f'''(0) = \left.\dfrac{e^x(1-e^x)}{(1+e^x)^3} \right \vert_{x=0} = 0$$
Hence, we have the Taylor series about $0$ to be
$$\log(2) + \dfrac{x}2 + \dfrac{x^2}8 + \mathcal{O}(x^4)$$
</s>