Taylor polynomial of $f(x) = 1/(1+\cos x)$ I'm trying to solve a problem from a previous exam. Unfortunately there is no solution for this problem.
So, the problem is:

Calculate the Taylor polynommial (degree $4$) in $x_0 = 0$ of the function:
  $$f(x) = \frac{1}{1+\cos(x)}$$

What I tried so far:


*

*calculate all $4$ derivatives

*$1+\cos(x) = 2\cos^2(\frac{x}{2})$ and work with this formula

*$\int\frac{1}{1+\cos(x)}dx = \tan(\frac{x}{2})$ and then use the Taylor series of $\tan(\frac{x}{2})$

*$\frac{1}{1 + \cos(x)} = \frac{1}{1 + \left(1 + \frac{x^2}{2!} + \cdots\right)}$


What do you think, is there a good way to calculate the Taylor polynomial of this function or is there just the hard way (derivatves)?

$$\cos x=\sum_{k=0}^\infty (-1)^k\frac{x^{2k}}{(2k)!}=1+\cos x= 2-\frac{x^2}{2}+\frac{x^4}{24}-...\Longrightarrow$$
$$\frac{1}{1+\cos x}=\frac{1}{2-\frac{x^2}{2}+\frac{x^4}{24}-...}=\frac{1}{2}\frac{1}{\left[1-\left(\frac{x}{2}\right)^2\right]\left(1-\frac{x^2}{24}+...\right)}=$$
$$=\frac{1}{2}\left(1+\frac{x^2}{4}+\frac{x^4}{8}+...\right)$$by taking the development of $$\frac{1}{1-x^2}$$
