Let $g$ be a convex nonegative function, and $p\ge1$. To show: $f(x)=g(x)^p$ is convex.
Let $h(x)=x^p$. Then clearly $f=h \circ g$. Denote $\tilde{h}$ as the extended-value extension of $h$, which assigns the value $\infty(-\infty)$ to points not in the domain of $h$ for $h$ convex(concave). Then S. Boyd's convex optimization book tells us:
$f=h \circ g$ is convex if $h$ is convex, $\tilde{h}$ is nondecreasing, and $g$ is convex.
Here is my question: If we define the domain of $h$ as $\mathbb{R}^+$, then $h$ is convex. However, $\tilde{h}$ is not nondecreasing! (Its $\infty$ for $x<0$). So how can we apply the composition property above to prove the convexity of $g(x)^p$?