I am wondering if a non-convex optimization problem can be reduced to a convex one by mapping non-convex functions/sets onto convex functions/sets. In this context, I would like to know if the following claim is true:
For any non-convex function $f: \mathbb{R} \rightarrow \mathbb{R}$ there exists a convex function $g : \mathbb{R} \rightarrow \mathbb{R}$ such that $f\circ g$ is convex.
For example, $f = \log(x)$ is not convex but $g(x) = \exp(x)$ (which is convex) yields $(f\circ g) (x) = x$ also convex.
Another example is $f(x) = x^3$ and $g(x) = \begin{cases} -x, & \text{if $x < 0$} \\[2ex] x, & \text{otherwise} \end{cases}.$
EDIT: $g$ constant is a trivial solution, but I am not interested in this case.