<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] From your expansions of $e^x$ and $e^{-x}$, we have $e^x+e^{-x}=2+2\dfrac{x^2}2+2\dfrac{x^4}{4!}+\cdots$,
so  sech$( x)=\dfrac2{e^x+e^{-x}}=\dfrac{2}{2+2\dfrac{x^2}2+2\dfrac{x^4}{4!}+\cdots}=\dfrac1{1+\dfrac{x^2}2+\dfrac{x^4}{4!}+\cdots}$
$=1-\left(\dfrac{x^2}2+\dfrac{x^4}{4!}+\cdots\right)+\left(\dfrac{x^2}{2}+\dfrac{x^4}{4!}+\cdots\right)^2\cdots$
$=1-\dfrac{x^2}2-\dfrac{x^4}{24}+\dfrac{x^4}{4}\cdots=1-\dfrac{x^2}2+\dfrac{5x^4}{24}\cdots$
</s>