Sum of strictly positive increasing function and negative decreasing function

256 Views Asked by At

I have two functions $f(x)$ and $g(x)$. $f(x)$ is positive and strictly increasing while $g(x)$ is negative and strictly decreasing. Is it possible that $f(x)+g(x)$ have multiple local maximas and minimas. Thanks in advance.

2

There are 2 best solutions below

0
On

It is possible, yes.

For example, if $f(x)=e^x$ and $g(x)=-e^x$, then the function $f(x)+g(x)$ has infinitely many local maxima and minima.

0
On

Yes. Take $f,g\colon(0,+\infty)\longrightarrow\mathbb R$ defined by $f(x)=2x+\sin(x)$ and $g(x)=-2x+\sin(x)$. Then $f(x)+g(x)=2\sin(x)$.