Function $ f:\mathbb{R}^n\rightarrow \mathbb{R} $ , given by $ f(x)=(1/2)x^T P x + q^T x + r$, where $P\succeq 0$, Prove this first and second order conditions are equivalent.
In S.Boyd's lecture:
First-order: f is convex if $f(y)\geq f(x)+\nabla f(x)^T(y-x)$
Second-order: f is convex if Hessian $\geq 0$
My attempt:
Second order: Calculate Hessian.
$$ \nabla f(x) = \frac12(P+P^T)x+ q = Px+q $$
$$ \nabla^2 f(x) = P $$
If $P\succeq 0$, then convex (Okay, so far).
Now, How do I do the same with the first-order?
I know that first-order and second-order are equivalent. How I do?
My attempt:
First-order: $f(y)\geq f(x)+\nabla f(x)^T(y-x)$
Then,
$$ f(y)\geq (1/2)x^T P x + q^T x + r+ (Px+q)^T(y-x) $$
I have difficulty simplifying first order
$$ f(y) - f(x) - \nabla f(x)(y-x) \ge 0 $$
$$ \varepsilon = \frac12 (y-x)^TP(y-x)\ge 0 $$
Now, you demonstrate the derivative and find P.