<s>[INST] Evaluating $\max(ab+bc+ac)$ 
Let a,b,c be real numbers such that $a+2b+c=4$. What is the value of $\max(ab+bc+ac)$

My attempt:
Squaring both the sides: 
$a^2 +4b^2+c^2+2ac+4bc+4ab=16$
Then I tried factoring after bringing 16 to LHS but couldn't. It's not even a quadratic in one variable or else I could have directly found the maximum. 
How do I proceed? 
 [/INST] Note that $4xy \leq (x+y)^2$ for all $x$, $y$.
You have $$ab+bc+ca = b(a+c) + ac \leq b(a+c) + \frac{1}{4}(a+c)^2 = (a+c) \frac{a+c+4b}{4} = \frac{1}{4}(a+c)(8-(a+c)) \leq \frac{1}{4}\frac{1}{4}8^2 = 4.$$
Equality is happen when $a=c$ and $a+c = 8-(a+c)$, or $a+c=4$.
</s>