I have a known real function f(x) >=0 with periodicity p.
$f(x+np) = f(x)$
f(x) is known to have two major components g(x) and h(x) that are also periodic, non-negative, and respectively symmetric about $x=a_1$ and $x=a_2$.
$f(x) = g(x) + h(x) + e(x)$
$g(x-a_1) = g(a_1-x)$
$h(x-a_2) = h(a_2-x)$
We can think of e(x) of an error term, the mismatch between the known f(x) and our solutions for g(x) and h(x), a mismatch we'd like to minimize.
$e(x) = f(x) - g(x) - h(x)$
$e(x) >=0$
How can I find solutions for g(x) and h(x) that minimizes e(x) over a period?
The definite integral of $|e(x)|^2$ is an obvious metric to try to minimize on, but really I’ll settle for any good solution that minimizes e() by some defensible metric.
I tried using Fourier transforms, so the translations by $a_1$ and $a_2$ would become phase shifts, but that approach had problems, for example no way to impose the constraints that g(), h(), and e() are >0 for all x.
Same problem when I tried variational calculus methods.
If it helps to treat f(x) as discrete instead of continuous, I can still use that solution.
So, how can I find a solution pair for g(x) and h(x) that minimizes e(x), where g(x) and h(x) are respectively symmetric about $x=a_1$ and $x=a_2$, and where g(x), h(x), and e(x) are >=0 for all x?