You can make computing the Taylor series somewhat easier by considering the complex exponential,
$$e^{inx}=\cos(nx)+i\sin(nx)$$
where $i=\sqrt{-1}$. Let $n=2$; then the imaginary parts of $e^{2ix}$ and its derivatives make up the Taylor expansion of $f(x)$.
Written in this way, the derivatives are a bit more convenient to compute:
$$\frac{\mathrm de^{2ix}}{\mathrm dx}=2ie^{2ix},\frac{\mathrm d^2e^{2ix}}{\mathrm dx}=(2i)^2e^{2ix},\frac{\mathrm d^3e^{2ix}}{\mathrm dx}=(2i)^3e^{2ix},\cdots$$
and the rule for the $n$th term for the expansion around $x=c$ is clearly $\frac{(2i)^ne^{2ic}}{n!}x^n$, which in turn means the $n$th term in the Taylor series of $f(x)$ is $\operatorname{Im}\left(\frac{(2i)^ne^{2ic}}{n!}\right)$.
At $c=0$, $e^{2ic}=1$. For even $n$, you have $i^n\in\{-1,1\}$; for odd $n$, $i^n\in\{-i,i\}$. So you only care about odd-indexed terms in the expansion of $e^{2ix}$. Let $n=2k-1$ for integers $k\ge1$:
$$\operatorname{Im}\left(\frac{(2i)^ne^{2ic}}{n!}\right)=\operatorname{Im}\left(\frac{2^{2k-1}i^{2k-1}}{(2k-1)!}\right)=\operatorname{Im}\left(-i\frac{2^{2k-1}i^{2k}}{(2k-1)!}\right)=\boxed{\frac{(-1)^{k+1}2^{2k-1}}{(2k-1)!}}$$
Taking $k\in\{1,2,3,4\}$, you get the same first four non-zero terms of the expansion:
$$\begin{align}
f(x) &\approx \frac{(-1)^{1+1} 2^1}{1!}x + \frac{(-1)^{2+1} 2^3}{3!}x^3 + \frac{(-1)^{3+1} 2^5}{5!}x^5 + \frac{(-1)^{4+1} 2^7}{7!}x^7\\[1ex]
&=2x-\frac{4x^3}3+\frac{4x^5}{15}-\frac{8x^7}{315}
\end{align}$$