<s>[INST] How to find the MacLaurin series of $\frac{1}{1+e^x}$ Mathcad software gives me the answer as: $$ \frac{1}{1+e^x} = \frac{1}{2} -\frac{x}{4} +\frac{x^3}{48} -\frac{x^5}{480} +\cdots$$
I have no idea how it found that and i don't understand. What i did is expand $(1+e^x)^{-1} $ as in the binomial MacLaurin expansion. I want until the $x^4$ term. So what i found is the following:
$$ (1+e^x)^{-1} = 1 - e^x + e^{2x} + e^{3x} + e^{4x}+\cdots\tag1 $$
Then by expanding each $e^{nx}$ term individually:
$$ e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24}+\cdots\tag2 $$
$$ e^{2x} = 1 + 2x + 2x^2 + \frac{3x^3}{2} + \frac{2x^4}{3}+\cdots\tag3 $$
$$ e^{3x} = 1 + 3x + \frac{9x^2}{2} + \frac{9x^3}{2} + \frac{27x^4}{8}+\cdots\tag4 $$ 
$$ e^{4x} = 1 + 4x + 8x^2 + \frac{32x^3}{3} + \frac{32x^4}{3}+\cdots\tag5 $$
So substituting $(2),(3),(4),(5)$ into $(1)$ i get:
$$ (1+e^x)^{-1} = 1 +2x+5x^2+ \frac{22x^3}{3} + \frac{95x^4}{12} +\cdots$$
Which isn't the correct result. Am i not allowed to expand this series binomially? I've seen on this site that this is an asymptotic expansion. However, i don't know about these and i haven't been able to find much information on this matter to solve this. If someone could help me understand how to solve it and why my approach isn't correct, i would be VERY grateful. Thanks in advance.
 [/INST] Just a sketch of a proof to be expanded later (sorry, I am in a hurry): by taking the logarithmic derivative of the Weierstrass product of the $\cosh$ function we have the Taylor series of the $\tanh$ function, with the coefficients depending on values of the $\zeta$ function at even integers. With a little maquillage it is not difficult to turn that into the Taylor series of $\frac{1}{1+e^x}$. Or we may just play a bit with the generating function of Bernoulli numbers.
So, I was saying:
$$\cosh z = \prod_{n\geq 0}\left(1+\frac{4z^2}{(2n+1)^2 \pi^2}\right)\tag{1}$$
hence:
$$ \tanh z = \sum_{n\geq 0}\frac{8z}{(2n+1)^2 \pi^2 + 4z^2}\tag{2} $$
leads to:
$$ \tanh z = \sum_{m\geq 0}(-1)^m z^{2m+1}\sum_{n\geq 0}\frac{2^{2m+3}}{\pi^{2m+2}(2n+1)^{2m+2}}\tag{3}$$
by expanding the general term of the RHS of $(2)$ as a geometric series. Computing the innermost sum in terms of the $\zeta$ function it follows that:
$$\tanh z = \sum_{m\geq 0}\frac{2(-1)^m\left(2^{2m+2}-1\right) }{\pi^{2m+2}}\zeta(2m+2)\, z^{2m+1}\tag{4}$$
but since $\frac{1}{1+e^{z}}=\frac{1-\tanh(z/2)}{2}$ it follows that:
$$\frac{1}{1+e^{z}}=\frac{1}{2}-\sum_{m\geq 0}\frac{(-1)^m\left(2^{2m+2}-1\right) }{2^{2m+1}\pi^{2m+2}}\zeta(2m+2)\, z^{2m+1}\tag{5}$$
so to solve the original problem it is enough to recall that $\zeta(2)=\frac{\pi^2}{6}$ and $\zeta(4)=\frac{\pi^4}{90}$.
Moreover, through $(5)$ it is straightforward to compute the magnitude of the coefficients by simply approximating $\zeta(2m+2)$ with $1$. On the other hand, that is trivial also by considering that the radius of convergence of the Taylor series of $f(z)=\frac{1}{1+e^z}$ at $z=0$ is $\pi$, since $f(z)$ is a meromorphic function with two simple poles at $z=\pm \pi i$.
</s>