If a,b,c,d are positive integers with a sum of 63, what is the maximum value of ab + bc + cd ? (By using calculus to solve it)) [closed]
Given $a+b+c+d=63$.
Denote $f(a,b,c,d)=ab+bc+cd$.
We solve the question by Lagranges multiplier method.
Consider $F(a,b,c,d,\lambda)=ab+bc+cd+\lambda(a+b+c+d-63)$, where $\lambda$ is Lagrange multiplier.
Applying necessary conditions for maximum of $f$ i.e $$\frac{∂F}{∂a}=\frac{∂F}{∂b}=\frac{∂F}{∂c}=\frac{∂F}{∂d}=\frac{∂F}{∂\lambda}=0$$
We get $b+\lambda=0, a+c+\lambda=0, b+d+\lambda=0, c+\lambda=0\quad \text{and}\quad a+b+c+d=63$
$\implies a=0, d=0, \lambda=-\frac{63}{2}, c=\frac{63}{2}, b=\frac{63}{2}$
Since we need $a, b, c, d $ to be integers, so for $b $ and $c$ we can test the closest values of $31$ and $32$.
Hence $ab+bc+cd \lt 992$.
Therefore maximum value of $ab+bc+cd$ is $991$.
Another way to see this:
Note that the function can be written $ab+c(b+d)$ with $b+d\gt b$ so given fixed $b$ and $d$ we want $c$ as large as possible and $a$ as small as possible, so $a=1$.
Similarly we can express the function as $(a+c)b+cd$ so $d=1$ and $b$ is as large as possible.
This gives us $b+c+bc$ as the total with $b+c=61$ so the maximum value of the function is the maximum of $61+bc$ for $b+c=61$
Then maximising a product when the sum is fixed is well known; the identity $$4bc=(b+c)^2-(b-c)^2$$ will do the trick - $b$ and $c$ have to be as close together as possible.
This was recently posted on youtube.
https://www.youtube.com/watch?v=0Ai9ygHu3L4
Anwyway, $ab + bc + cd = (a+c)(b+d) - ad$
To maximize the objective, set $ad = 1$ and make $(a+c)\times (b+d)$ as close to square as possible.
$32\times 31 - 1 = 991$
Let $a=x+1,$ $b=y+1$, $c=z+1$ and $d=t+1$.
Thus, $x+y+z+t=59$, where $x,$ $y$, $z$ and $t$ are non-negatives and by AM-GM we obtain: $$ab+bc+cd=(x+1)(y+1)+(y+1)(z+1)+(z+1)(t+1)=$$ $$=xy+yz+zt+x+2y+2z+t+3=xy+yz+zt+y+z+62\leq$$ $$\leq xy+yz+zt+tx+59+62=(x+z)(y+t)+121\leq$$ $$\leq\left(\frac{x+z+y+t}{2}\right)^2+121=991.25.$$ Id est, $$ab+bc+cd\leq991,$$ but for $$(a,b,c,d)=(1,30,31,1)$$ we have equality, which says that we got a maximal value.