Maximum value of $ab+bc+ca$ given that $a+2b+c=4$

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.$$


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$


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$.