2

In an answer to this question, it was stated that if a function is the sum of two functions $f(x)=g(x)+h(x)$, and ${(\forall{x})(g(x)\ge0)}$ and $(\forall{x})(h(x)\ge0)$, the relative maxima of $f(x)$ can be found by finding the relative maxima of $g(x)$ and $h(x)$.

Intuitively I can somewhat grasp why this is the case, but analytically, what is the explanation for why this is true?

1 Answers1

4

That's not true, if I understand correctly.

For example, $[1+\sin(x)]+[1+\cos(x)]$ is a sum of two positive functions with maxima at $0,\pi/2$ (plus shifts) respectively where the whole function takes the value $3$.

However, at $x=\pi/4$ we get $1+\sqrt 2/2+1+\sqrt 2/2=2+\sqrt 2> 3$.

Draw the graph to check it out.


Looking at the other question quickly, it's possible that what you're interested in is the special case where $g,h$ have the same sign for their slopes at all points.

In this case, it is true (at least for nice differentiable functions) because of the following reasoning: let $x$ be not a maximum of $g,h$. Then both $g,h$ must increase away from $x$ in at least one direction, and that must be the same direction. Therefore $g+h$ increases in that direction too.

Note that the $g,h>0$ thing doesn't really tell you anything since you can always shift the whole graph up by a constant and smoothly kill away behaviour at infinity.

not all wrong
  • 16,178
  • 2
  • 35
  • 57