Give example of functions $f, g : \Bbb R \to \Bbb R$ such that $f(x)$ is convex, $g(x)$ is increasing and $h(x)=g(f(x))$ is not convex

60 Views Asked by At

Here's my example which I am uncertain is correct:

$f(x) = -log(x)$ is convex

$g(x) = x^2$

$g(f(x)) = (-log(x))^2$ is not convex

Is that correct? The issue I was considering was that $x^2$ is not an increasing function on all of $\Bbb R$. Any suggestions?

4

There are 4 best solutions below

0
On BEST ANSWER

$f(x) = e^x$ is convex on $\mathbb R$ and $g(x) = \arctan x$ is increasing on $\mathbb R.$ However $g(f(x))=\arctan e^x$ is not convex on $\mathbb R.$ You can see this by calculating

$$(g\circ f)''(x) = \frac{e^x-e^{3x}}{(1+e^{2x})^2},$$

which is negative on $(0,\infty).$

0
On

$f(x)=x$ for all $x$, $g=0$ for $x<0$, $1$ for $x \geq 0$. Since $g\circ f$ is not continuous it is not convex. If you want to make $g$ strictly increasing you can take $g(x)=x$ for $x<0$ and $x+1$ for $x \geq 0$.

0
On

An easy example is the following $f(x)=x^2$ and $g(x)=\sqrt[3]x$.

0
On

Just find an increasing function which is not convex and call it $g$

Like $f(x) = x$ , $g(x) = x^3$