[Math] Taylor expansion of composite functions

calculusfunction-and-relation-compositionintuitiontaylor expansion

Suppose one has a function of the form: $$f(x)=\sqrt{1+a\cos^{2}(x)}$$ where $a$ is some parameter.

Firstly, what is the correct method for Taylor expanding such a composite function? Should one just repeatedly use the chain rule $(f\circ g)'(x)=f'(g(x))g'(x)$ to determine the coefficients of the Taylor expansion, such that it has the form: $$(f\circ g)(x)=(f\circ g)(x_{0})+(f\circ g)'(x_{0})(x-x_{0})+\frac{1}{2}(f\circ g)''(x_{0})(x-x_{0})^{2}+\cdots$$ or is there a different method?

Secondly, although not technically a Taylor expansion, if the parameter $a<<1$ is it reasonable to approximate the function as $$\sqrt{1+a\cos^{2}(x)}\approx 1+\frac{a}{2}\cos^{2}(x)$$ i.e. naively plugging in $a\cos^{2}(x)$ to the Taylor expansion for $\sqrt{1+x}=1+\frac{x}{2}-\frac{x^{2}}{8}+\mathcal{O}(x^{3})$?

Best Answer

Your method would work, but it'd involve computing a lot of unpleasant derivatives. A better method would be to expand $cos^2(x)$, then expand the square root: $$\sqrt{1+a \cos^2(x)} = \sqrt{1 + a \left(1 - \frac{1}{2} x^2 + \mathcal{O}(x^4)\right)^2} \\ = \sqrt{1 + a \left(1 - x^2 + \mathcal{O}(x^4)\right)} \\ = \sqrt{1 + a - a x^2 + \mathcal{O}(x^4)} \\ = \sqrt{1+a} \sqrt{1 - \frac{a}{1+a} x^2 + \mathcal{O}(x^4)} \\ = \sqrt{1+a} \left(1 - \frac{a}{2(1+a)} x^2 + \mathcal{O}(x^4)\right) \\ = \sqrt{1+a} - \frac{a}{2\sqrt{1+a}} x^2 + \mathcal{O}(x^4)$$

Related Question