Why does $\cos(\sin (x))$ look like a cosine wave

taylor expansiontrigonometry

Motivation:

enter image description here

I noted that the graph is closest to the following:

enter image description here

It kind of makes sense since $\sin x$ is periodic so throwing it into the cosine means it's still periodic, to some extent. I don't think I'm the first one to think of this but I can't find any explanation anywhere. Maybe I haven't tried enough.

My own thought is that the function's butchered Taylor series is $\displaystyle \sum_{n=0}^{\infty} \dfrac{(-1)^n (\sin x)^{2n}}{(2n)!}$ which makes sine waves (also cosine waves, same difference) like so:

$f(x) = 1-\dfrac{(\sin x)^2}{2!}+\dfrac{(\sin x)^4}{4!}-\dfrac{(\sin x)^6}{6!} \cdots$

Normally when I do things like this I arrive at very complicated solutions so I'm not even sure this can be solved with at most Calc 3 knowledge. Is there any justification that makes intuitive sense?

Best Answer

We have $f(x) = \cos(\sin(x))$ and $g(x)=(1-a)\cos{2x}+a$, where $a=\frac12 (1+\cos(1))$.

Note that we can rewrite $g$ as $$g(x)=(1-a)\left(1-2\sin^2 {x}\right)+a=1-2(1-a)\sin^2{x}$$

so putting $u=\sin{x}$, we want to show that $$\cos{u} \approx 1-2(1-a)u^2$$

for $-1\le u \le 1$.

We can check this graphically, but noting that $a=0.770\ldots$ we can also see that $2(1-a)\approx \frac12$, so this is very close to the Taylor series for $\cos{u}$.


We can stop at this point, but if we want to optimise the quadratic approximation precisely over the range $-1\le u \le 1$, we can take a least squares approach. We certainly want the function to be even; so we can take $\mu+\nu u^2$ as the approximation. We want to minimise

$$\int_0^1 \left(\cos{u}-\mu-\nu u^2 \right)^2 du$$

We can explicitly calculate this integral, and differentiate with respect to $\mu$ and $\nu$ to find the optimal approximation by least squares on the interval to be $$\begin{align} \cos{u} &\approx 6 \sin(1) - \frac12 (15 \cos(1))+\left(\frac{45}{2} \cos(1) - 15 \sin(1)\right)u^2 \\ &\approx 0.997-0.465u^2 \end{align}$$

which is very close indeed to the initial approximation, which was $$g(u)=1-0.460u^2$$

Related Question