Is f1+f2 unimodal if f1 and f2 is monotonic?

391 Views Asked by At

I have recently encountered one programming problem which was reduced to find minimum value of function.Function f was sum of two functions f1 and f2 and f1 is strictly increasing and f2 is strictly decreasing. How can I prove that f1+f2 is unimodal from given information? I tried to think intuitively by considering slopes of f1 and f2 but I am not able to prove above fact. Can anyone give some approach or explanation? Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

You can't prove it because it isn't true. $f1$ could increase rapidly for a while as $f2$ is slowly decreasing, leading the sum to increase, then $f2$ could decrease rapidly for a while while $f1$ is slowly increasing, making the sum decrease. Repeat this and you can have as many peaks in the sum as you want. An example is below. $f1$ is in blue, $f2$ is in red, $f1+f2$ is in yellow and is bimodal

enter image description here

0
On

If $f_1$ is an increasing and $f_2$ is decreasing it is not necessarily true that $g(x):= f_1(x) + f_2(x)$ is unimodal. Consider the following example: $f_1(x) = x$ when $x<1$, $f(x) = 4x$ when $x\geq 1$, and $f_2(x) = -x^2$. Then $g(x)=x-x^2$ when $x<1$ and $g(x) = 4x-x^2$ when $x\geq 1$. The function $g(x)$ has two local maxima at $(1/2,1/4)$ and $(2, 4)$.