<s>[INST] Proving that the set enclosed by an ellipse is convex I'm trying to prove that the following set ($B$) defined by an ellipse is convex, but I am getting stuck.
$$B = \left\{(x_1,x_2):3(x_1-3)^2+2(x_2-3)^2 \leq 1 \right\} $$
My sad attempt:
$$ \textrm{Let }x,y \: \in \: B \:, \: \lambda \: \in \: [0,1]$$
$$ \lambda x+(1-\lambda)y=(\lambda x_1+(1-\lambda)y_1,\: \lambda x_2 +(1-\lambda)y_2  )$$
$$3(\lambda x_1 + (1-\lambda)y_1 -3)^2+2(\lambda x_2+(1-\lambda)y_2-3)^2=3(\lambda ^2x_1^2 +(1-\lambda)^2y_1^2+9+2\lambda x_1(1-\lambda)y_1-6\lambda x_1 -6(1-\lambda)y_1)+2(\lambda ^2x_2^2 +(1-\lambda)^2y_2^2+9+2\lambda x_2(1-\lambda)y_2-6\lambda x_2 -6(1-\lambda)y_2)$$
and this is where I have lost all confidence in proving it. I was able to factor some of the terms into the form $(\lambda x_1 -3)^2$, $((1-\lambda) y_1 -3)^2$, $(\lambda x_2 -3)^2$, and $((1-\lambda) x_2 -3)^2$, but I don't think that helps the situation any.
 [/INST] We have to prove that if $(a_1,b_1) \in B$, and $(a_2,b_2) \in B$ then $$(a,b)=(\lambda a_1+(1-\lambda)a_2,\lambda b_1+(1-\lambda)b_2) \in B.$$
The trick is to observe that $a-3 = \lambda(a_1-3)+(1-\lambda)(a_2-3)$ and $b-3 = \lambda(b_1-3)+(1-\lambda)(b_2-3)$.
Consequently,
$$3(a-3)^2 + 2(b-3)^2 = 3(\lambda (a_1-3)+(1-\lambda)(a_2-3))^2 + 2(\lambda (b_1-3)+(1-\lambda)(b_2-3))^2.$$
Simplifying the RHS, we get
$$3(a-3)^2 + 2(b-3)^2 = \lambda^2(3(a_1-3)^2+2(b_1-3)^2) + (1-\lambda)^2(3(a_2-3)^2+2(b_2-3)^2) \\+ 2\lambda(1-\lambda)(3(a_1-3)(a_2-3)+2(b_1-3)(b_2-3)).$$
Since $3(a_1-3)^2+2(b_1-3)^2 \le 1$ and $3(a_2-3)^2+2(b_2-3)^2 \le 1$, we get
$$3(a-3)^2 + 2(b-3)^2 \le \lambda^2 + (1-\lambda)^2+ 2\lambda(1-\lambda)(\color{red}{3(a_1-3)(a_2-3)+2(b_1-3)(b_2-3)}).$$
By Cauchy-Schwarz inequality, the red expression can be bounded as
$$3(a_1-3)(a_2-3)+2(b_1-3)(b_2-3) \le \sqrt{(3(a_1-3)^2+2(b_1-3)^2)(3(a_2-3)^2+2(b_2-3)^2)}=1.$$
Therefore,
$$3(a-3)^2 + 2(b-3)^2 \le \lambda^2 + (1-\lambda)^2+ 2\lambda(1-\lambda) =1.$$
Q.E.D.
</s>