- f[{a_,a_},{a_,a_},{x1_,x2_}]:=x1^a x2^a;
- f[{a1_,a2_},{b1_,b2_},{x1_,x2_}]:=x x1^b1 x2^b2+y x1^b2 x2^b1/.Solve[{b1 x+b2 y==a1,b2 x+b1 y==a2},{x,y}][[1]];
- f[{a_,a_,a_},{b1_,b2_,b3_},{x1_,x2_,x3_}]:=(x1^b1 x2^b2 x3^b3+x1^b3 x2^b1 x3^b2+x1^b2 x2^b3 x3^b1)/3;
- f[{a1_,a2_,a3_},{b1_,b2_,b3_},{x1_,x2_,x3_}]:=Block[{m=(b1+b2+b3)/3,α1=a1-m,α2=a2-m,α3=a3-m,B1=b1-m,B2=b2-m,B3=b3-m,t1=B1/α1,t2=(B1+B2)/(α1+α2),temp=If[t1>t2,t=t2;(x1 x2)^m f[{t α1,t α2},{B1,B2},{x1,x2}] x3^b3,t=t1;x1^b1 (x2 x3)^m f[{t α2,t α3},{B2,B3},{x2,x3}]]},Assuming[Element[{x1,x2,x3},PositiveReals],Simplify[temp]]/t+(1-1/t)f[{m,m,m},{b1,b2,b3},{x1,x2,x3}]];
- check[expr_]:=Total[Function[a,(a/.{x1->1,x2->1,x3->1})Exponent[a,#]&/@{x1,x2,x3}]/@(List@@Expand[expr])];
Copy the Code 验证
输出$\frac{\text{x1}^2}{2}+\frac{\text{x2}^2}{2}$
输出$\frac{3 \text{x1}^6 \text{x2}^2}{4}+\frac{\text{x1}^2 \text{x2}^6}{4}$
- {a1,a2,a3}={4,5/2,5/2};
- {b1,b2,b3}={5,3,1};
- f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]
- check[%]=={a1,a2,a3}
Copy the Code 输出$\frac{1}{4} \text{x1}^5 \text{x2} \text{x3} \left(\text{x2}^2+\text{x3}^2\right)+\frac{1}{6} \left(\text{x1}^5\text{x2}^3 \text{x3}+\text{x1} \text{x2}^5 \text{x3}^3+\text{x1}^3 \text{x2} \text{x3}^5\right)$
True
- {a1,a2,a3}={3,3,2};
- {b1,b2,b3}={5,2,1};
- f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]
- check[%]=={a1,a2,a3}
Copy the Code 输出
$\frac{1}{5} \text{x1}^2 \text{x2}^2 \left(\text{x1}^3+\text{x2}^3\right) \text{x3}+\frac{1}{5} \left(\text{x1}^5\text{x2}^2 \text{x3}+\text{x1} \text{x2}^5 \text{x3}^2+\text{x1}^2 \text{x2} \text{x3}^5\right)$
True
- {a1,a2,a3}={7/2,5/2,2};
- {b1,b2,b3}={4,3,1};
- f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]
- check[%]=={a1,a2,a3}
Copy the Code 输出
$\frac{1}{16} \text{x1}^4 \text{x2} \text{x3} \left(7 \text{x2}^2+3 \text{x3}^2\right)+\frac{1}{8} \left(\text{x1}^4 \text{x2}^3 \text{x3}+\text{x1} \text{x2}^4 \text{x3}^3+\text{x1}^3 \text{x2} \text{x3}^4\right)$
True
- {a1,a2,a3}={1,0,-1};
- {b1,b2,b3}={2,-1,-1};
- f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]
- check[%]=={a1,a2,a3}
Copy the Code 输出
$\frac{2 \text{x1}^3+\text{x2}^3}{3 \text{x1} \text{x2} \text{x3}}$
True
- {a1,a2,a3}={7/2,3,5/2};
- {b1,b2,b3}={5,3,1};
- f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]
- check[%]=={a1,a2,a3}
Copy the Code 输出
$\frac{1}{4} \text{x1}^5 \text{x2}^3 \text{x3}+\frac{1}{4} \left(\text{x1}^5 \text{x2}^3 \text{x3}+\text{x1} \text{x2}^5 \text{x3}^3+\text{x1}^3\text{x2} \text{x3}^5\right)$
True
- {a1,a2,a3}={1,1,1};
- {b1,b2,b3}={5/3,2/3,2/3};
- f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]
- check[%]=={a1,a2,a3}
Copy the Code 输出
$\frac{1}{3} \left(\text{x1}^{5/3} \text{x2}^{2/3} \text{x3}^{2/3}+\text{x1}^{2/3} \text{x2}^{5/3} \text{x3}^{2/3}+\text{x1}^{2/3} \text{x2}^{2/3}\text{x3}^{5/3}\right)$
True
- ClearAll[a1,a2,a3,b1,b2,b3];
- list={a1,a2,a3,b1,b2,b3}/. FindInstance[{a1,a2,a3,b1,b2,b3}∈ImplicitRegion[{a1>=a2>=a3,b1>=b2>=b3,a1<=b1,a1+a2<=b1+b2,a1+a2+a3==b1+b2+b3},{a1,a2,a3,b1,b2,b3}],{a1,a2,a3,b1,b2,b3},Reals,10];
- For[i=1,i<=10,i++,{a1,a2,a3,b1,b2,b3}=list[[i]];Print[check[f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]]=={a1,a2,a3},{a1,a2,a3,b1,b2,b3}]]
Copy the Code 输出(全True).
最后让$a_1,a_2,a_3$不同, $b_1,b_2,b_3$也不同, 验证一下:
- ClearAll[a1,a2,a3,b1,b2,b3];
- list={a1,a2,a3,b1,b2,b3}/. FindInstance[{a1,a2,a3,b1,b2,b3}∈ImplicitRegion[{a1>a2>a3,b1>b2>b3,a1<=b1,a1+a2<=b1+b2,a1+a2+a3==b1+b2+b3},{a1,a2,a3,b1,b2,b3}],{a1,a2,a3,b1,b2,b3},Reals,10];
- For[i=1,i<=10,i++,{a1,a2,a3,b1,b2,b3}=list[[i]];Print[check[f[{a1,a2,a3},{b1,b2,b3},{x1,x2,x3}]]=={a1,a2,a3},{a1,a2,a3,b1,b2,b3}]]
Copy the Code 输出(全True). |