<s>[INST] Maclaurin expansion for sech$(x)$ I am a bit unsure where I have gone wrong in working this out.
Sech$(x)=2/(e^x+e^{-x}).$
Maclaurin expansions:
$e^x = 1+ x +  x^2/2+ x^3/6 + x^4/24;\; e^{-x} = 1- x + x^2/2 - x^3/6 -  x^4/24;$
so sech$(x)= (1+x^2/2+x^4/24)^{-1}.\;$  (I think this is where I have gone wrong.)
The actual answer is $1-x^2/2+ 5x^4/24$ (first 3 terms).
How would I work this out?
 [/INST] Since in a neighbourhood of the origin $\cosh(x)=1+\frac{x^2}{2}+\frac{x^4}{24}+O(x^6)$ we have $\operatorname{sech}(x)=1-\frac{x^2}{2}+Ax^4+O(x^6)$
and since
$$ \left(1+\frac{x^2}{2}+\frac{x^4}{24}\right)\left(1-\frac{x^2}{2}+Ax^4\right)=1+\left(A-\frac{5}{24}\right)x^4+O(x^6) $$
we must have $A=\frac{5}{24}$. This unique non-trivial coefficient can also be found by considering that
$$\cosh(x)=\prod_{n\geq 0}\left(1+\frac{4x^2}{\pi^2(2n+1)^2}\right)\tag{1} $$
$$\operatorname{sech}(x)=\prod_{n\geq 0}\sum_{m\geq 0}\frac{(-1)^m 4^m x^{2m}}{\pi^{2m}(2n+1)^{2m}}\tag{2} $$
$$\operatorname{sech}(\sqrt{x})=\prod_{n\geq 0}\sum_{m\geq 0}\frac{(-1)^m 4^m x^{m}}{\pi^{2m}(2n+1)^{2m}}\tag{3} $$
$$ [x^2]\operatorname{sech}(\sqrt{x})=\frac{16}{\pi^4}\sum_{a>b\geq 0}\frac{1}{(2a+1)^2(2b+1)^2}+\frac{16}{\pi^4}\sum_{n\geq 0}\frac{1}{(2n+1)^4}\tag{4} $$
and the RHS of $(4)$ just depends on the values of $\zeta(2)=\frac{\pi^2}{6}$ and $\zeta(4)=\frac{\pi^4}{90}$.
</s>