Olympiad Maths Prep

Track / Stage 5 / 225 of 400 #825 of 2000

Problem 825

AIME late
Algebra Difficulty 5.5 Find the answer

10. Given x1,x2,,x40x_{1}, x_{2}, \cdots, x_{40} are all positive integers, and x1+x_{1}+ x2++x40=58x_{2}+\cdots+x_{40}=58. If the maximum value of x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} is AA, and the minimum value is BB, then the value of A+BA+B is \qquad

Official solution

10.494.

Since the number of ways to write 58 as the sum of 40 positive integers is finite, the minimum and maximum values of x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} exist.
Assume without loss of generality that x1x2x40x_{1} \leqslant x_{2} \leqslant \cdots \leqslant x_{40}.
If x1>1x_{1}>1, then x1+x2=(x11)+(x2+1)x_{1}+x_{2}=\left(x_{1}-1\right)+\left(x_{2}+1\right), and
(x11)2+(x2+1)2=x12+x22+2(x2x1)+2>x12+x22. \begin{array}{l} \left(x_{1}-1\right)^{2}+\left(x_{2}+1\right)^{2} \\ =x_{1}^{2}+x_{2}^{2}+2\left(x_{2}-x_{1}\right)+2>x_{1}^{2}+x_{2}^{2} . \end{array}

Therefore, when x1>1x_{1}>1, x1x_{1} can be gradually adjusted to 1, at which point x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} will increase.

Similarly, x2,x3,,x39x_{2}, x_{3}, \cdots, x_{39} can be gradually adjusted to 1, at which point x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} will increase.

Thus, when x1,x2,,x39x_{1}, x_{2}, \cdots, x_{39} are all 1 and x40=19x_{40}=19, x12+x_{1}^{2}+ x22++x402x_{2}^{2}+\cdots+x_{40}^{2} reaches its maximum value, i.e.,
A=12+12++1239 terms +192=400 A=\underbrace{1^{2}+1^{2}+\cdots+1^{2}}_{39 \text { terms }}+19^{2}=400 \text {. }

If there exist two numbers xix_{i} and xjx_{j} such that
xjxi2(1i<j40), then (xi+1)2+(xj1)2=xi2+xj22(xjxi1)<xi2+xj2. \begin{array}{l} x_{j}-x_{i} \geqslant 2 \quad(1 \leqslant i<j \leqslant 40), \text { then } \\ \left(x_{i}+1\right)^{2}+\left(x_{j}-1\right)^{2} \\ =x_{i}^{2}+x_{j}^{2}-2\left(x_{j}-x_{i}-1\right)<x_{i}^{2}+x_{j}^{2} . \end{array}

This indicates that in x1,x2,,x39,x40x_{1}, x_{2}, \cdots, x_{39}, x_{40}, if the difference between any two numbers is greater than 1, then by increasing the smaller number by 1 and decreasing the larger number by 1, x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} will decrease.

Therefore, when x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} reaches its minimum value, the difference between any two numbers in x1,x2,,x40x_{1}, x_{2}, \cdots, x_{40} does not exceed 1.

Thus, when x1=x2==x22=1x_{1}=x_{2}=\cdots=x_{22}=1 and x23=x24==x40=2x_{23}=x_{24}=\cdots=x_{40}=2, x12+x22++x402x_{1}^{2}+x_{2}^{2}+\cdots+x_{40}^{2} reaches its minimum value, i.e.,
B=12+12++1222 terms +22+22++2218 terms =94 B=\underbrace{1^{2}+1^{2}+\cdots+1^{2}}_{22 \text { terms }}+\underbrace{2^{2}+2^{2}+\cdots+2^{2}}_{18 \text { terms }}=94 \text {. }

Hence, A+B=494A+B=494.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.