TITLE: Maximum value of $ab+bc+ca$ given that $a+2b+c=4$
QUESTION [6 upvotes]: Question: 

Find the maximum value of $ab+bc+ca$ from the equation,
  $$a+2b+c=4$$  

My method: 

I tried making quadratic equation(in $b$) and then putting discriminant greater than or equal to $0$. It doesn't help as it yields a value greater than the answer.

Thanks in advance for the solution.

REPLY [3 votes]: $ab + bc + ac = a(2 - \frac12a -\frac12c) + c(2 - \frac12a - \frac12c) + ac\\= 2a - \frac12a^2 + 2c - \frac12c^2$
$(2a - \frac12a^2)$ can be shown to have a maximum value of $2$ for real $a$. It follows that $(2a - \frac12a^2) + (2c - \frac12c^2)$ has a maximum value of $4$ for real $a$ and $c$. As observed in other answers, the value of $4$ is attained at $(a, b, c) = (2, 0, 2)$.