Find an function that oscillates between a given upper and lower envelope

386 Views Asked by At

Suppose I'm given two real, continuous functions $f(x)$ and $g(x)$ such that $f(x)\ge g(x)$ for all real $x$. I'd like to determine an oscillating function $h(x)$ that has $f(x)$ as its upper-envelope and $g(x)$ as its lower envelope. The following image comes from the Wikipedia page titled "Envelope (waves)".

enter image description here

I'm interested in an open form for the blue function. Thanks for any references or help.

2

There are 2 best solutions below

0
On BEST ANSWER

One possibility is $$ h(x) = (\sin^2 x) f(x) + (1 - \sin^2 x) g(x). $$ The function $\sin^2 x$ oscillates between $0$ and $1$, reaching each extreme once per cycle; $h(x)$ uses $\sin^2 x$ to interpolate between $f(x)$ and $g(x)$, so when $\sin^2 x = 0$, $h(x) = g(x)$, but when $\sin^2 x = 1$, $h(x) = f(x)$.

0
On

One possibility is to have $$h(x)=[f(x)+g(x)]/2+\cos(x) [f(x)-g(x)]/2 $$ You can replace the $\cos(x)$ with any trigonometric function that oscillates between -1 and 1. The first term is the average between the curves, the second contains the distance from the average to each of the curves