(*Show that the reduced stiffnesses due to C4 and D4*)(*differ only by a rotation.The same works for C3 and D3.*)(*Define the reduced CC as obtained in the first part:*)CCtetpiezo={{{{C[1,1,1,1],-C[1,2,2,2],0},{-C[1,2,2,2],C[1,1,2,2],0},{0,0,C[2,2,3,3]}},{{-C[1,2,2,2],C[1,2,2,1],0},{C[1,2,2,1],C[1,2,2,2],0},{0,0,0}},{{0,0,C[2,3,3,2]},{0,0,0},{C[2,3,3,2],0,0}}},{{{-C[1,2,2,2],C[1,2,2,1],0},{C[1,2,2,1],C[1,2,2,2],0},{0,0,0}},{{C[1,1,2,2],C[1,2,2,2],0},{C[1,2,2,2],C[1,1,1,1],0},{0,0,C[2,2,3,3]}},{{0,0,0},{0,0,C[2,3,3,2]},{0,C[2,3,3,2],0}}},{{{0,0,C[2,3,3,2]},{0,0,0},{C[2,3,3,2],0,0}},{{0,0,0},{0,0,C[2,3,3,2]},{0,C[2,3,3,2],0}},{{C[2,2,3,3],0,0},{0,C[2,2,3,3],0},{0,0,C[3,3,3,3]}}}}
CCtetcentral={{{{DD[1,1,1,1],0,0},{0,DD[1,1,2,2],0},{0,0,DD[2,2,3,3]}},{{0,DD[1,2,2,1],0},{DD[1,2,2,1],0,0},{0,0,0}},{{0,0,DD[2,3,3,2]},{0,0,0},{DD[2,3,3,2],0,0}}},{{{0,DD[1,2,2,1],0},{DD[1,2,2,1],0,0},{0,0,0}},{{DD[1,1,2,2],0,0},{0,DD[1,1,1,1],0},{0,0,DD[2,2,3,3]}},{{0,0,0},{0,0,DD[2,3,3,2]},{0,DD[2,3,3,2],0}}},{{{0,0,DD[2,3,3,2]},{0,0,0},{DD[2,3,3,2],0,0}},{{0,0,0},{0,0,DD[2,3,3,2]},{0,DD[2,3,3,2],0}},{{DD[2,2,3,3],0,0},{0,DD[2,2,3,3],0},{0,0,DD[3,3,3,3]}}}}
(*Define a rotation by kappa around the cyclic axis*)
Q=RotationMatrix[kappa,{0,0,1}];
(*The D-components and kappa are variables*)
vars={DD[1,1,1,1],DD[1,1,2,2],DD[2,2,3,3],DD[1,2,2,1],DD[2,3,3,2],DD[3,3,3,3],kappa};
(*They can be determined s.t.the reduced stiffnesses match.*)
(*Simplify assuming only reals.*)
$Assumptions=_Symbol∈Reals;
res=Solve[Rayleigh[Q,CCtetcentral,4]-CCtetpiezo==0,vars]
//FullSimplify