Consider the quadratic function $f(x_1,x_2,x_3,x_4)=x_1+2x_2+4x_4+x_1^2+5x_2^2+3x_3^2x_4^2-4x_1x_2-2x_2x_3+2x_3x_4$. Is f a convex function?
Consider a constraint defined using the above function f: $f(x_1,x_2,x_3,x_4)\le6$. Is is a convex constraint?
I think f is a convex function when I write the function in matrix notation I have the sum of a positive definite matrix and a linear vector. How do I show that a constraint is convex?
I think, you should differentiate it twice.
$$\begin{align*} f'({\bf x}) &:= \begin{bmatrix} \partial_1f, \partial_2f, \partial_3f, \partial_4f \end{bmatrix} \\ f''({\bf x})&:=[\partial_i\partial_jf]_{i,j} \end{align*} $$ and conclude whether this symmetric matrix $f''({\bf x})$ is positive semidefinit or not.