I have a function: $$f(x)=\cos\left(\pi x\right)\cos\left(\frac{33}{x}\pi\right)-1$$ What I want to know is that is there such a function that is continuous in $\mathbb{R}$ and "curves around" $f(x)$ at its local maxima. Now, I know that "curves around" is not rigorously defined, so here is a crudely drawn picture so there is a clearer picture about what I want:

Function that Touches all the Local Maxima of another function
73 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
As pointed out by Christian Blatter, your problem is difficult and there will not be a unique solution. I was involved with such problems about a decade ago while working on a class of nonlinear problems. Unfortunately, I do not recall all of it. I do know, however, that what you need is the sift algorithm described by Huang et al., https://royalsocietypublishing.org/doi/pdf/10.1098/rspa.1998.0193. This will give a robust solution to a variety of problems like this. The figures below are a quick and dirty solution that I carried out. You can see that that there are difficulties with the high frequency regime; this would probably be rectified with a higher resolution. Otherwise, it's alright. Also notice how far out I carried the calculation.



Your picture shows that such a function is not uniquely determined, whatever the definition of "curving around". Even $f$ itself is "curving around" its local maxima. If you want a "simple" expression defining a function $g$ such that $g(x)\geq f(x)$ for all $x\in{\mathbb R}$ then note that $$-1\leq\cos{33\pi\over x}\leq1\qquad(x\in{\mathbb R})\ ,$$ and that the middle term here is very often $=\pm1$, especially in the interval $-{\pi\over2}\leq x\leq{\pi\over2}$. It follows that $$g(x):=\bigl|\cos(\pi x)\bigr|-1$$ is a simple expression defining something like your blue curve.