My data strongly resembles $y=\left|\cos(f(x))\right|$, how can I graph $f(x)$? From my data set, of which I collected myself, I notice that the graph is extremely sinusoidal, except the frequency continually decreases to $0$ as $x\rightarrow\infty$. It strongly resembles
$$y=\left|\cos(f(x))\right|$$
for an unknown $f(x)$. However, I'm quite confident about two things:
$$\lim_{x\to\infty}f(x)=0 \tag 1$$
$$f'(x)<0\,\forall x > 0 \tag 2$$
I have values of $y$ for $\forall x\in\{1,2,3,\dots,1000\}$. I do have the ability to collect data for larger values of $x$, it will just take longer computationally.
The following is not the actual graph of my data, but a highly-resembling example.


If $y=\left|\cos(f(x))\right|$, how can I manipulate my data in a way that I can isolate (with reasonable accuracy) a graph of $f(x)$?

I assume something to do with approximating the derivative may be helpful here.
 A: I think some shifted version of $g(x) = |\cos(e^{-x})|$ should fit quite well. You could use a form like so
$$f(x) = A|\cos(e^{-cx + d})|$$
Now you can play with A,c,d to get your function
Using the particular example of $f(x) = |\cos(e^{-\frac{x}{100} + 3.5})|$ check below

**EDIT **
Noticing the question asks for how to get $f(x)$, using the above, we can guess that $f(x)$ should take the form of $\exp(-cx+d)$, then use the data list to use a least squares estimate to get values for $c,d$ that reduce approximation error
A: A good start is to define $z=\pm \arccos y$ and tabulate it as a function of $x$.  Pick some point to be the $0$ of $z$, maybe the peak near $x=235$ is convenient.  Then follow the graph, flipping the sign at the points where the original graph hits $y=0$.  You have $z(195)=\frac \pi 2, z(168)=\pi, z(142)=\frac {3\pi}2,$ and so on.  $z$ should be a much smoother function of $x$ and maybe you can fit it nicely.
A: Let $z=2y^2-1$, which should model $\cos2f$.
In intervals where $z$ is decreasing, let $w =\arccos z$, and where $z$ is increasing, let $w=-\arccos z$.
W will jump down by $2\pi$ when you go from decreasing to increasing, so add $2\pi$ to everything to the right of each jump.  This accumulates, so you will add $2\pi$ between the first two jumps, $4\pi$ between jumps 2 and 3, then $6\pi$ and so on.
