Solution (source code)

= Solution

The square is on the <cosine>: near zero, $\ln(\cos^2x)=2\ln(\cos x)$. Substituting $\cos x=1-x^2/2+x^4/24+O(x^6)$ into the <logarithmic series> gives
$$
\ln(\cos x)=-\frac{x^2}{2}+\frac{x^4}{24}-\frac12\frac{x^4}{4}+O(x^6)=-\frac{x^2}{2}-\frac{x^4}{12}+O(x^6).
$$
Therefore
$$
\boxed{\ln(\cos^2x)=-x^2-\frac{x^4}{6}+O(x^6).}
$$