Maximum value of $ab+bc+ca$ given that $a+2b+c=4$ 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.
 A: Hint: Plugging $$c=4-a-2b$$ into your given term we get
$$f(a,b)=-a^2+4a-2ab-2b^2+4b$$ and now differentiate this with respect to $a,b$
A: You can use Lagrange Multiplier. You would get:
$$F(a,b,c,\lambda) = ab + bc + ca - \lambda(a+2b+c-4)$$
Take the partial derivatives and equate them to zero.
$$0 = F_a = b + c - \lambda$$
$$0 = F_b = a + c - 2\lambda$$
$$0 = F_c = a + b - \lambda$$
Then:
$$0 = F_a + F_c - F_b = b + c - \lambda + a + b - \lambda - a - c + 2\lambda = 2b$$
Thus we must have $b=0$. Then this prompts that $c = a = \lambda$ and so we get that $a=c=\lambda = 2$
So we get that the maximum occurs at $(a,b,c) = (2,0,2)$ and it's $4$.
A: For $a=2$, $b=0$ and $c=2$ we'll get a value $4$.
We'll prove that it's a maximal value.
Indeed, we need to prove that
$$ab+ac+bc\leq4\left(\frac{a+2b+c}{4}\right)^2$$ or
$$(a-c)^2+4b^2\geq0,$$ which is obvious.
A: $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)$.
A: Without using calculus: Substituting $c=4-2b-a$, we get $$ab+bc+ca=ab+(a+b)(4-2b-a)=(4(a+b)-(a+b)^2)-b^2$$ and since $f(x)=4x-x^2=4-(x-2)^2$ has maximum at $(2,4)$, substituting $x:=a+b$ gives $$ab+bc+ca\le4-b^2\le4.$$
