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?

The simplest way t get it is to write $\;\operatorname{sech} x=\frac1{\cosh x}$ and to use the MacLaurin expansion  of $\cosh x$ at order $4$:
$$\cosh x=1+\frac{x^2}2+\frac{x^4}{24}+o(x^4)$$
You obtain the expansion of its reciprocal  dividing  $1$ by the MacLaurin expansion of $\cosh x$ along increasing powers, up to order 4, truncating every term at order $4$ in this process:
$$\begin{array}[t]{r|}
1\phantom{{}-\frac{x^2}2-\frac{x^4}{24}} \\
-1-\frac{x^2}2-\frac{x^4}{24}\\\hline
-\frac{x^2}2-\frac{x^4}{24} \\ 
\frac{x^2}2+\frac{x^4}{4} \\ \hline
\frac{5x^4}{24}\\ -\frac{5x^4}{24}\\\hline 0
\end{array}
\begin{array}[t]{l}
1+\frac{x^2}2+\frac{x^4}{24} \\\hline
\color{red}{1 -\frac{x^2}2+\frac{5x^4}{24}}
\end{array}$$
