TITLE: An Intriguing Identity: $\cos(2x) \overset{?}{=} \log_{\cos(1)}\frac{\cos(\cos(x))}{\cos(\sin(x))}$
QUESTION [22 upvotes]: I was playing around with Desmos and noticed that:
$$\cos(2x)=\log_{\cos(1)}\frac{\cos(\cos(x))}{\cos(\sin(x))}$$
I derived this from:
$$\int_{\cos(x)}^{\sin(x)} \tan(u)du$$
when I noticed it looked similar to a sine wave, $\ln(\cos(1))\cos(2x)$, did some algebra and came up with the identity. It seems to check out on a graphing calculator relatively well, except I have no idea why this works. This seems very intriguing to me because it includes nestled trig functions and the cosine of 1, which is very odd to equal a simple cosine function. If anybody can prove this, it could be interesting to see. I have a feeling this is slightly off, because of how much the complexities of the sides differ, so if anybody can disprove it, that would also be great. Thank you.

REPLY [3 votes]: I know this is a bit late, but I wanted to give one more perspective with the Fourier transform.  Let $$f(x) = \log_{\cos(1)}\frac{\cos(\cos(x))}{\cos(\sin(x))}.$$  We can use MATLAB to take the discrete Fourier transform of $f(x)$ with the following code:
N=2^5;  %Number of grid points
L = 2*pi;   %Length of interval
dx = L/N;   %Spatial step size
k = [0:N/2-1 0 -N/2+1:-1]*(2*pi/L); %Wavenumbers in order
x = (0:(N-1))*dx;   %Grid points
y = log(cos(cos(x))./cos(sin(x)))/log(cos(1));  %f(x)
yt = fft(y);    %Discrete Fourier transform of f(x)

Looking at the the real part of the spectrum gives us the following.

The large spikes correspond to $k = 2$, and the smaller bumps correspond to $k = 6$.  $k = 10$ also experiences slight activation.  With this level of resolution none of the other nodes are active within $10^{-4}.$  In particular this gives us some insight as to why  $f(x) \approx \cos(2x).$  Using the output from MATLAB at this resolution we can approximate $f(x)$ as
$$f(x) \approx \frac{1}{16}\left(15.9245\cos \left(2x\right)+0.0748\cos \left(6x\right)+0.0007\cos \left(10x\right)\right).$$