设t = x+y.
∵ x+y+z = 4,
∴z = 4-(x+y) = 4-t.
又∵xy+yz+zx = 5,
∴xy = 5-z(x+y) = 5-zt = 5-(4-t)t = 5-4t+t².
根据均值不等式, xy ≤ (x+y)²/4 = t²/4,
于是t²/4 ≥ 5-4t+t², 整理得(3t-10)(t-2) ≤ 0, 故2 ≤ t ≤ 10/3, 也即2 ≤ x+y ≤ 10/3.
易验证x = y = 5/3, z = 2/3满足条件, 并使得x+y ≤ 10/3成立等号.
因此x+y的最大值就是10/3.
注: 解释一下取等条件x = y = 5/3, z = 2/3的来源.
当t = 10/3时, 不等式t²/4 ≥ 5-4t+t²成立等号,
这要求均值不等式, xy ≤ (x+y)²/4成立等号, 因此x = y.
而t = x+y, 故x = y = 5/3. 此外z = 4-t = 2/3.