Maclaurin Expansion of $f(x)=\ln (\cos x)$ Find up to the $x^4$ term in the Maclaurin expansion of $f(x)=\ln (\cos x)$
I've only just learnt about Maclaurin Series today so I'm not too familiar with them. Do I have to find up to the 4th derivative (I've tried it and it gets quite messy) or can I use one of the known expansions to do this?
 A: Notice that 
$$f'(x)=-\tan x=-x-\frac{x^3}3+O(x^5)$$
hence by taking the anti-derivative and since $f(0)=0$ we get
$$f(x)=-\frac{x^2}2+-\frac{x^4}{12}+O(x^6)$$
A: This is a nice exercise. Since:
$$ \cos x = \prod_{n\geq 0}\left(1-\frac{4x^2}{(2n+1)^2 \pi^2}\right) \tag{1}$$
by the Weierstrass product for the cosine function, we have:
$$ \log\cos x = \sum_{n\geq 0}\log\left(1-\frac{4x^2}{(2n+1)^2 \pi^2}\right),\tag{2} $$
and since, over $|z|<1$, $\log(1-z)=-\sum_{m\geq 1}\frac{z^m}{m}$, we have:
$$ \log\cos x = -\sum_{m\geq 1}\left(\frac{2x}{\pi}\right)^{2m}\sum_{n\geq 0}\frac{1}{m(2n+1)^{2m}}=-\sum_{m\geq 1}\frac{(4^m-1)\zeta(2m)}{m\,\pi^{2m}}\,x^{2m}\tag{3}$$
giving the full Taylor series around $x=0$. Since $\zeta(2)=\frac{\pi^2}{6}$ and $\zeta(4)=\frac{\pi^4}{90}$,
$$\log\cos x = -\frac{x^2}{2}-\frac{x^4}{12}+O(x^6).\tag{4}$$
A: You can combine the Maclaurin series of the logarithm and cosine here.
If you look at the Maclaurin series for $\cos(x)$, it starts with $1$. The series you should know for $\ln$ is the Maclaurin series of $\ln(1+x)$. So you can substitute somewhat conveniently: 
$$\ln(\cos(x))=\ln \left ( 1 + \sum_{n=1}^\infty \frac{(-1)^n x^{2n}}{(2n)!} \right ) \\
= \sum_{m=1}^\infty \frac{(-1)^{m+1} \left ( \sum_{n=1}^\infty \frac{(-1)^n x^{2n}}{(2n)!} \right )^m}{m}$$
This looks horrible, but it isn't actually so bad if you use the binomial theorem in the right way. With $m=1$ you get terms of degree $2,4,6,\dots$; with $m=2$ you get terms of degree $4,6,8,\dots$; after that you never have terms of degree $4$ again. So grouping up the terms of degree $4$, there's a coefficient of $1/4!=1/24$ from $m=1$ and a coefficient of $-1/2 (-1/2)^2=-1/8$ from $m=2$. These add up to $-1/12$, which is the coefficient you want.
Sami's answer is better in this case, however.
A: We have $\cos x = 1 + h(x)$, where $h(x) = -\frac{1}{2}x^2 + \frac{1}{24}x^4 + O(x^6)$ as $x \to 0$. 
Since $h(x) \to 0$, we have
$$f(x) = \ln(\cos x) = \ln(1 + h(x)) = h(x) -\frac{1}{2}h(x)^2 + O(h(x)^3).$$
Since $h(x) \sim -\frac{1}{2}x^2$, we have $h(x)^3 \sim -\frac{1}{8}x^6$, so $O(h(x)^3) = O(x^6)$. Thus
$$
\begin{align*}
f(x) &=  -\frac{1}{2}x^2 + \frac{1}{24}x^4 + O(x^6) -\frac{1}{2}[-\frac{1}{2}x^2 + O(x^4)]^2 + O(x^6) \\
&= - \frac{1}{2}x^2 + \frac{1}{24}x^4 + O(x^6) - \frac{1}{8} x^4 + O(x^6) + O(x^6) \\
&= -\frac{1}{2}x^2 - \frac{1}{12}x^4 + O(x^6).
\end{align*}
$$
