The question comes from this pdf (2010 part a)
$$f(x) = \begin{cases} \frac{\cos x - 1}{x^2} & x \neq 0 \\ -\frac{1}{2} & x = 0 \end{cases}$$ The function $f$, defined above, has derivatives of all orders. Let $g$ be the function defined by $$g(x) = 1 + \int_0^x f(t) dt$$ (a) Write the first three nonzero terms and the general term of the Taylor series for $\cos x$ about $x = 0$. Use this series to write the first three nonzero terms and the general term of the Taylor series for $f$ about $x=0$.
I do not understand how to use the Taylor series of $\cos(x)$ to write the series for $f$ at $x = 0$. If $f(0) = -1/2$, then wouldn't it make the $f'()$, $f''()$, $f'''()$ of the taylor series $0$ (etc). Wouldn't this make every term after first term of the taylor series $0$?
The solution says
$$f(x) = -\frac{1}{2} + \frac{x^2}{4!} - \frac{x^4}{6!} + \cdots + (-1)^{n+1} \frac{x^{2n}}{(2n)!} + \cdots$$
Thank you very much.