2
$\begingroup$

I have a huge expression. And I have "checked" numerically that it is 0 for real value variables. However, due to the size and structure of the expression FullSimplify seems to be having a hard time.

Question: Are there any other tools than FullSimplify I can use or do you have any suggestions how to show hat a huge expression is actually 0?

Here is the expression if anybody wants to try out his suggestions:

I suspect (if it turns out that it is not true, I am still interested in the answer to the above question):

myFunc[EA,EC,J,t1,t2,xi,phi,sign1,sign2,1]-myFunc[EA,EC,J,t1,t2,xi,phi,sign1,sign2,-1]==0

Here is myFunc:

Clear[myFunc]
myFunc[EA_, EC_, J_, t1_, t2_, xi_, phi_, sign1_, sign2_, sign3_] := (EA + EC)/2 + (1/(2*Sqrt[6]))*sign1*Sqrt[2*(EA - EC)^2 + J^2 + 8*t1^2 + 8*t2^2 + xi^2 + (2*2^(1/3)*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi]))))/((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])) + sign3*Sqrt[-4*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^3 + ((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^2])^(1/3) + 2^(2/3)*((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])) + sign3*Sqrt[-4*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^3 + ((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^2])^(1/3)] + (1/2)*sign2*Sqrt[(1/3)*(2*(EA - EC)^2 + J^2 + 8*t1^2 + 8*t2^2 + xi^2) - (2^(1/3)*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi]))))/(3*((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])) + sign3*Sqrt[-4*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^3 + ((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^2])^(1/3)) - (1/(3*2^(1/3)))*((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])) + sign3*Sqrt[-4*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^3 + ((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^2])^(1/3) - (Sqrt[3/2]*sign1*((-EA + EC)*(J - xi)*(J + xi) + 4*J*(-t1^2 + t2^2)*Cos[phi]))/Sqrt[2*(EA - EC)^2 + J^2 + 8*t1^2 + 8*t2^2 + xi^2 + (2*2^(1/3)*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi]))))/((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])) + sign3*Sqrt[-4*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^3 + ((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^2])^(1/3) + 2^(2/3)*((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])) + sign3*Sqrt[-4*((1/16)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^2 + 3*(EA + EC)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (3/4)*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^3 + ((-(1/32))*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)^3 - (9/4)*(EA + EC)*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi]) + (27/4)*(-4*EA^2*EC + EC*(J^2 + 4*(t1^2 + t2^2)) + EA*(-4*EC^2 + 4*(t1^2 + t2^2) + xi^2) + 2*J*(-t1^2 + t2^2)*Cos[phi])^2 - 18*(-4*(EA^2 + 4*EA*EC + EC^2) + J^2 + 8*(t1^2 + t2^2) + xi^2)*(-4*t1^2*t2^2 + 2*EA*EC*(t1^2 + t2^2) + (1/16)*J^2*(4*EC^2 - xi^2) + (1/4)*EA^2*(-4*EC^2 + xi^2) + EC*J*(-t1^2 + t2^2)*Cos[phi] - J*t1*t2*xi*Sin[phi]) + (27/4)*(EA + EC)^2*(64*t1^2*t2^2 - 32*EA*EC*(t1^2 + t2^2) + 4*EA^2*(4*EC^2 - xi^2) + J^2*(-4*EC^2 + xi^2) + 16*J*(EC*(t1 - t2)*(t1 + t2)*Cos[phi] + t1*t2*xi*Sin[phi])))^2])^(1/3)]];
(*extra line convenient for copy.*)

And it holds that:

All appearing parameters are real values. sign1 and sign2 are +-1.

Edit 1:

As requested, if you replace J with J*sign4 in myFunc you get all solutions of this polynomial of degree 8 by changing sign1,sign2 and sign4 keeping sign3=-sign4:

p[x_]:=-4 (EA + EC) x^7 + x^8 - 2 x^6 (c^2 - 3 EA^2 - 8 EA EC - 3 EC^2 + s^2 + 2 (t1^2 + t2^2) +     xi^2) + 4 x^5 (-EA^3 - 6 EA^2 EC + c^2 (EA + 2 EC) +     EC (-EC^2 + 2 s^2 + 3 (t1^2 + t2^2) + xi^2) +     EA (-6 EC^2 + s^2 + 3 (t1^2 + t2^2) + 2 xi^2)) + (2 c EC (t1 -        t2) (t1 + t2) + 2 EA EC (t1^2 + t2^2) +     c^2 (EC - xi) (EC + xi) + 
EA^2 (-EC^2 + xi^2) + (EC s + 2 t1 t2 - s xi) (-2 t1 t2 +        s (EC + xi))) (2 c EC (-t1^2 + t2^2) + 2 EA EC (t1^2 + t2^2) +     c^2 (EC - xi) (EC + xi) +     EA^2 (-EC^2 + xi^2) + (EC s - 2 t1 t2 - s xi) (2 t1 t2 +        s (EC + xi))) + x^4 (c^4 + EA^4 + 16 EA^3 EC + EC^4 - 12 EC^2 s^2 + s^4 -     12 EC^2 t1^2 + 4 s^2 t1^2 + 4 t1^4 - 12 EC^2 t2^2 + 4 s^2 t2^2 +     16 t1^2 t2^2 + 4 t2^4 + 2 (-EC^2 + 2 (s^2 + t1^2 + t2^2)) xi^2 + 
xi^4 + 4 EA EC (4 EC^2 - 4 s^2 - 9 (t1^2 + t2^2) - 4 xi^2) +     2 EA^2 (18 EC^2 - s^2 - 6 (t1^2 + t2^2 + xi^2)) +     2 c^2 (-EA^2 - 8 EA EC - 6 EC^2 + s^2 +        2 (t1^2 + t2^2 + xi^2))) - 4 x^3 (c^4 EC + EA^4 EC +     EA^2 EC (6 EC^2 - 2 s^2 - 9 (t1^2 + t2^2) - 6 xi^2) +     EA^3 (6 EC^2 - t1^2 - t2^2 - 2 xi^2) +     EC (s^4 - EC^2 (2 s^2 + t1^2 + t2^2) +        2 (t1^4 + 4 t1^2 t2^2 + t2^4) + (t1^2 + t2^2) xi^2 +        s^2 (3 (t1^2 + t2^2) + 2 xi^2)) +     c^2 (-2 EA^2 EC + EA (-6 EC^2 + t1^2 + t2^2 + 2 xi^2) + 
   EC (-2 EC^2 + 2 s^2 + 3 (t1^2 + t2^2) + 2 xi^2)) +     EA (EC^4 + 2 (t1^4 + 4 t1^2 t2^2 + t2^4) + 3 (t1^2 + t2^2) xi^2 +        xi^4 + s^2 (t1^2 + t2^2 + 2 xi^2) - 
   EC^2 (6 s^2 + 9 (t1^2 + t2^2) + 2 xi^2))) + 2 x^2 (-EC^4 s^2 + 3 EC^2 s^4 + 6 EC^2 s^2 t1^2 + 2 EC^2 t1^4 +     6 EC^2 s^2 t2^2 + 8 EC^2 t1^2 t2^2 - 4 s^2 t1^2 t2^2 - 
8 t1^4 t2^2 + 2 EC^2 t2^4 -     8 t1^2 t2^4 + (2 EC^2 s^2 - (s^2 + 2 t1^2) (s^2 + 2 t2^2)) xi^2 -     s^2 xi^4 + 2 EA^3 EC (4 EC^2 - 3 (t1^2 + t2^2) - 4 xi^2) + 
c^4 (3 EC^2 - xi^2) + EA^4 (3 EC^2 - xi^2) +     EA^2 (3 EC^4 + 2 (t1^4 + 4 t1^2 t2^2 + t2^4) +        2 (s^2 + 3 (t1^2 + t2^2)) xi^2 + 3 xi^4 -        6 EC^2 (s^2 + 3 (t1^2 + t2^2) + xi^2)) +     2 EA EC (4 (t1^4 + 4 t1^2 t2^2 + t2^4) -        EC^2 (4 s^2 + 3 (t1^2 + t2^2)) + 3 (t1^2 + t2^2) xi^2 +        s^2 (3 (t1^2 + t2^2) + 4 xi^2)) + 
c^2 (-EC^4 - 2 (t1^4 + t2^4) - 2 (s^2 + t1^2 + t2^2) xi^2 -        xi^4 + 2 EA^2 (-3 EC^2 + xi^2) +        2 EC^2 (3 (s^2 + t1^2 + t2^2) + xi^2) +        2 EA EC (-4 EC^2 + 3 (t1^2 + t2^2) + 4 xi^2))) - 4 x (4 c s t1 t2 (-t1^2 + t2^2) xi +     c^4 EC (EC - xi) (EC + xi) + (EA^2 EC - EC (s^2 + t1^2 + t2^2) +        EA (EC^2 - t1^2 - t2^2 - xi^2)) (4 t1^2 t2^2 -        2 EA EC (t1^2 + t2^2) + EA^2 (EC - xi) (EC + xi) +        s^2 (-EC^2 + xi^2)) +     c^2 (2 EA^2 EC (-EC^2 + xi^2) +        EC (EC^2 (2 s^2 + t1^2 + t2^2) - 
      2 (t1^4 + t2^4) - (2 s^2 + t1^2 + t2^2) xi^2) -        EA (EC^4 + xi^2 (t1^2 + t2^2 + xi^2) -           EC^2 (3 (t1^2 + t2^2) + 2 xi^2))))
(*extra line*)
$\endgroup$
4
  • $\begingroup$ Have you tried Simplify? Or the option TimeConstraint? Sometimes it helps to do a little bit of simplification first using these methods. $\endgroup$
    – Michael E2
    Nov 27 '14 at 18:17
  • 1
    $\begingroup$ @MichaelE2 I tried something like this PossibleZeroQ[ myFunc[EA, EC, J, t1, t2, xi, phi, sign1, sign2, 1] - myFunc[EA, EC, J, t1, t2, xi, phi, sign1, sign2, -1], Assumptions -> sign1 ∈ {-1, 1} && sign2 ∈ {-1, 1} && Thread[# ∈ Reals &@{EA, EC, J, t1, t2, xi, phi}]] and it hasn't completed atfter a few minutes. I guess there is no hope with Simplify either. While testing numerically more extensively than in the answer below yielded always zero. $\endgroup$
    – Artes
    Nov 27 '14 at 18:36
  • 1
    $\begingroup$ What's the origin of myFunc? It looks like it was generated by solving a polynomial of some sort. If that's the case, could you provide this information? We may be able to prove equivalence with that. $\endgroup$
    – Chip Hurst
    Nov 27 '14 at 20:11
  • $\begingroup$ @ChipHurst The origin is indeed a Polynomial of degree 8 which Mathematica can split into two Polynomials of degree 4. The 8 Solutions turned out to differ only by four signs inserted into the right place. However, after I series-expanded the expression one sign dropped out no matter the order I tried. Thus I assumed that the expression is invariant under sign change which seems to be the case (numerical studies). I have added the characteristic polynomial to my question. $\endgroup$
    – NOhs
    Dec 1 '14 at 8:34
2
$\begingroup$

First try numerical tests. Usually I do something like this:

test = Flatten[{Thread[
    Rule[{EA, EC, J, t1, t2, xi, phi}, 
     N[Rationalize[RandomReal[{-100, 100}, {7}], 0], 50]]], 
   sign1 -> 1, sign2 -> 1}]

{EA -> 5.5070945764813754067707123269662591210087398718144, EC -> 17.031759538199065766888472553401509641037985359085, J -> -30.131253476348398553051101194231010502960690964764, t1 -> 1.5102309452269758582666999059099783476519629716454, t2 -> -59.227461091403198733423282755362970908377276982560, xi -> -90.932057375163736635618092501815504589844494856171, phi -> 21.983047852241497252070159373899197116276883508615, sign1 -> 1, sign2 -> 1}

(myFunc[EA, EC, J, t1, t2, xi, phi, sign1, sign2, 1] - 
   myFunc[EA, EC, J, t1, t2, xi, phi, sign1, sign2, 1]) /. test

0.*10^-49

Running this many times as well as changing precision (here it is set to 50) one can see that the difference is always close to zero and gets closer when precision is increased.

Mathematica also has special function PossibleZeroQ. But I would not hope much on that. As you probably know the problem of deciding if one expression is equal to other is undecidable in principle.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.