Let $f:\mathbb R^n \rightarrow [-\infty,+\infty]$. show that the perspectie of $f$ defined via
$$ g(x,y)=yf(x/y),\qquad x\in \mathbb R^n,y\in \mathbb R_+ $$ is convex iff $f(x)$ is a convex function.
$$\nabla g(x,y)=\left(\frac{\partial yf(x/y) }{\partial x}, \frac{\partial yf(x/y) }{\partial y}\right)= \left(\frac{y \partial f(x/y) }{\partial x}, \frac{\partial yf(x/y) }{\partial y}\right)\\= \left(y \frac{\partial f(x/y) }{\partial x} \frac{1}{y}, f(\frac{x}{y}) + \frac{\partial f(x/y) }{\partial y} (-\frac{x}{y})\right)$$
Ok. I have shown the $1$-st derivative. But how do I know it is convex? I do not know how to continue for the second derivative? $2$-nd derivative must be $> 0$.
Stephen Boyd's book proves this in section 3.2.6 using epigraphs. Exercise 3.33 hints that you can also do this directly from the definition of convexity.