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?
From the given condition $\,2b=4-a-c\,$, then:
$$\require{cancel} \begin{align} 2(ab+bc+ca) &= 2b(a+c)+2ac \\ &= (a+c)(4-a-c)+2ac= \\ &= 4a - a^2 - \bcancel{ac} + 4c - \bcancel{ac} - c^2 + \bcancel{2ac} = \\ &= \color{red}{8} -a^2 + 4a \color{red}{-4} - c^2 +4c \color{red}{-4} = \\ &= 8 - (a-2)^2 - (c-2)^2 \\ &\le 8 \end{align} $$
Equality is attained for $a=c=2\,$, so the upper bound is in fact a maximum.