让
f[x_,y_,z_] := Sqrt[3x+1]+Sqrt[3y+1]+Sqrt[3z+1]
我想使用mathematica 为x>=0&&y>=0&&z>=0&&x+y+z==1 获得f 的最小值。
PS:我确实知道如何通过数学方法获得最小值:
Since 0<=x<=1,0<=y<=1,0<=z<=1, we have
0<=x^2<=x,0<=y^2<=y,0<=z^2<=z.
Hence,
3a+1 >= a^2 + 2a + 1 = (a+1)^2, where a in {x,y,z}.
Consequently,
f[x,y,z] >= x+1+y+1+z+1 = 4,
Where the equality holds if and only if (x==0&&y==0||z==1)||...
PS2:我预计下面的代码会起作用,但它没有。
Minimize[{f[x,y,z],x>=0&&y>=0&&z>=0&&x+y+z==1},{x,y,z}]
实际上,正如西蒙指出的那样,它有效......运行时间比我预期的要长,我在 Mahtematica 向我展示结果之前关闭了它。