Suppose we have a function $f: \mathbb{R}^n\to \mathbb{R}$ that is given by $f(x) = \prod_{i=1}^n\,(1+x_i^2)$. How can we prove or disprove that the function is convex?
1 Answers
It's not convex over all of $\mathbb{R}^n$. For example, if $n=2$, restricted to the line $x_1=2+t$, $x_2=2-t$, the function reduces to $t^4 - 6t^2 + 25$ which is nonconvex.
However, it is locally convex in certain regions. Computing the Hessian:
$$D_{jk} f =\begin{cases} \frac{2 f}{1+x_j^2} & j=k\\ \frac{4 x_j x_k f}{(1+x_j^2)(1+x_k^2)} & j \ne k\end{cases} $$
$$\frac{(1+x_j^2)(1+x_k^2)}{2f} D_{jk} f =\begin{cases} 1+x_j^2 & j=k\\ 2 x_j x_k & j \ne k\end{cases} $$
$$ \nabla^2f = 2f \ \text{diag}(1+x_i^2)^{-1}(\text{diag}(1-x_i^2)+2 x x^T)\text{diag}(1+x_i^2)^{-1} $$
So $f$ is locally convex wherever $(\text{diag}(1-x_i^2)+ 2x x^T)$ is positive semidefinite. For example, when $n=2$ this is equivalent to $1+x_1^2+x_2^2-3x_1^2 x_2^2 \ge 0.$ In general, a simple sufficient condition for local convexity is $\|x\|_\infty \le 1$.
- 6,401