<s>[INST] Quick way to expand $\cos^{-1}(\cos^2 x)$ up to $O(x^2)$ For a part of a question, I need to expand $\cos^{-1}(\cos^2 x)$ up to $O(x^2)$ about $x=0$. It took me quite a while to get an incorrect answer. What are some quick and efficient offline (i.e, no alpha) ways to get a good approximation?
EDIT: To elaborate a bit more, the first order term can be confidently stated to be $\sqrt{2}x$ as this expression is the length of a hypotenuse for a right spherical triangle, which must reduce to the flat triangle hypotenuse. No "reasoning" like this could work for second order term so I had to take the cumbersome way.
 [/INST] We have $\cos^2 x = \left( 1 - \frac{x^2}{2} + O(|x|^4) \right)^2 = 1 - x^2 + O(|x|^4)$. Since $\cos x = 1 - \frac{x^2}{2} + O(|x|^4)$, it follows that $\cos^{-1} \left( 1 - \frac{x^2}{2} \right) = x + O(|x|^2)$, hence
$$\cos^{-1} \left( \cos^2 x \right) = \sqrt{2} x + O(|x|^2).$$
Edit: Jyrti seems to be right. Writing $\cos^{-1} \left( \cos^2 x \right) = \sqrt{2} (x + h)$, we get
$$\cos^2 x = 1 - x^2 + O(|x|^4) = 1 - (x + h)^2 + O(|x|^4)$$
so we can get $h = O(|x|^3)$. Just for fun, writing $h = ax^3 + O(|x|^4)$ we get
$$1 - x^2 + \frac{x^4}{3} + O(|x|^6) = 1 - x^2 - 2ax^4 + \frac{x^4}{6} + O(|x|^6)$$
hence $a = - \frac{1}{12}$ and
$$\cos^{-1} \left( \cos^2 x \right) = \sqrt{2} x - \sqrt{2} \frac{x^3}{12} + O(|x|^4).$$

Note that these power series computations are much faster than repeated computation of derivatives using the chain rule. The manipulations I'm doing make sense in the ring of formal power series modulo $x^4$ or $x^5$ or whatever precision I care about, and in that generality there's no need to think in terms of complicated sums of products of functions (which implicitly carry information about the derivatives to all orders, which is irrelevant).  
</s>