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

• Are the variables assumed to be positive? – Dr. Sonnhard Graubner Sep 7 '18 at 15:55
• No. It is not given. So no. Whenever they are positive, it gets mentioned in the question. – Love Invariants Sep 7 '18 at 15:56
• @LoveInvariants What is even nicer is that $4$ is the only positive integer that satisfies $$ab+bc+ca=a+2b+c\quad\ddot\smile$$ – TheSimpliFire Sep 7 '18 at 16:35
• @TheSimpliFire- Thats a very nice observation. 😊 – Love Invariants Sep 7 '18 at 16:53

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)$, we have that $\max\{a+b\}=2$ so $$ab+bc+ca\le4-b^2$$ and the minimum value of $b$ is zero, yielding a maximum value of $4$.

• I was searching for something like this. Thanks. – Love Invariants Sep 7 '18 at 16:07

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$

• Easy solution. Thanks for the solution. Upvoted your answer. – Love Invariants Sep 7 '18 at 16:07

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

• I didn't want to use. But Lagrange is always the easiest. way to find these type of answers. Upvoted your answer. – Love Invariants Sep 7 '18 at 16:05

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.

• It feels nice when you learn so many ways to solve a problem. Indeed a great way and different from others. Upvoted your answer. I wish I could accept 2 answers. XD – Love Invariants Sep 7 '18 at 16:09

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