<s>[INST] Prove $\sqrt{x_1^2+4x_1x_2+5x_2^2+2x_1+6x_2+5}$ is convex I came across a question which contained this $\sqrt{x_1^2+4x_1x_2+5x_2^2+2x_1+6x_2+5}$
I needed to prove $x_1^2+4x_1x_2+5x_2^2+2x_1+6x_2+5\geq0$ which I've done by just showing that the minimum is 3 and it's convex function.
The second part asked to show that the whole problem is convex but I didn't know how to prove $\sqrt{x_1^2+4x_1x_2+5x_2^2+2x_1+6x_2+5}$  is convex which is same as asking $\sqrt{x^TAx+b^Tx+c}$ is convex where $x^TAx+b^Tx+c\geq0$. any help?
 [/INST] Note that
$$
x^\top A x + b^\top x + c = \begin{bmatrix}x^\top&1\end{bmatrix}\begin{bmatrix}A&b/2\\b^\top/2 & c\end{bmatrix}\begin{bmatrix}x\\1\end{bmatrix} = \tilde{x}^\top\tilde{A}\tilde{x}.
$$
Now, we test $\tilde{A}$ for positive definiteness by calculating its principal minors (I'll skip most of the calculations). We have
$$
A = \begin{bmatrix}1&2\\2&5\end{bmatrix},\quad b=\begin{bmatrix}2\\6\end{bmatrix},\quad c = 5,
$$
thus, the first principal minor is $1$, and we have $\det(A)>0$, which is the second principal minor of $\tilde{A}$. All that remains is to test $\det{\tilde{A}}$, which is (using Schur):
$$
c\det(A - \frac{bb^\top}{4c}) = 5\begin{vmatrix}1 - 1/5& 2-3/5\\2-3/5 &5-9/5\end{vmatrix} = 3 > 0.
$$
Since $\tilde{A}$ is positive definite, then $\lVert \tilde{x} \rVert_{\tilde{A}} = \sqrt{\tilde{x}^\top \tilde{A} \tilde{x}}$ is a norm, and thus convex.
</s>