I am trying to solve a real system of trigonometric polynomials, which contain 7 symbols {b[1],b[2],b[3],b[4],a[2],a[3],a[4]}
between 7 equations:
equs = {
eIX == 2 (b[1] b[2] Cos[a[2]] + b[3] b[4] Cos[a[3] - a[4]]),
eXI == 2 (b[1] b[3] Cos[a[3]] + b[2] b[4] Cos[a[2] - a[4]]),
eXX == 2 (b[2] b[3] Cos[a[2] - a[3]] + b[1] b[4] Cos[a[4]]),
eIZ == b[1]^2 - b[2]^2 + b[3]^2 - b[4]^2,
eZI == b[1]^2 + b[2]^2 - b[3]^2 - b[4]^2,
eZZ == b[1]^2 - b[2]^2 - b[3]^2 + b[4]^2,
1 == b[1]^2 + b[2]^2 + b[3]^2 + b[4]^2
}
All symbols are real and finite, and furthermore bounded:
assumps = {
0 <= b[1] <= 1,
0 <= b[2] <= 1,
0 <= b[3] <= 1,
0 <= b[4] <= 1,
0 <= a[2] <= 2 Pi,
0 <= a[3] <= 2 Pi,
0 <= a[4] <= 2 Pi,
-1 <= eIX <= 1,
-1 <= eXI <= 1,
-1 <= eXX <= 1,
-1 <= eIZ <= 1,
-1 <= eZI <= 1,
-1 <= eZZ <= 1
}
Mathematica 11.2 on my MacBook Pro seems unable to efficiently solve this system for the 7 aforementioned symbols, via commands like:
Solve[
Join[equs, assumps],
{b[1], b[2], b[3], b[4], a[2], a[3], a[4]},
Reals]
Reduce[
Join[equs, assumps],
{b[1], b[2], b[3], b[4], a[2], a[3], a[4]},
Reals]
Worrying about the transcendental functions, its easy to recast this system into a strictly polynomial one of 10 variables {b[1],b[2],b[3],b[4],c[2],c[3],c[4],s[2],s[3],s[4]}
(the new c
and s
replacing cos
and sin
) and 10 equations:
poly = Join[
equs /. Cos[a_ - b_] :> Cos[a] Cos[b] + Sin[a] Sin[b]
/. {Cos[a[n_]] -> c[n], Sin[a[n_]] -> s[n]},
Table[1 == c[n]^2 + s[n]^2, {n, 2, 4}]]
polyassumps = Join[
DeleteCases[assumps, _ <= a[_] <= _],
Flatten @ Table[{-1 <= c[n] <= 1, -1 <= s[n] <= 1}, {n, 2, 4}]]
The system is now 10 degree-4 polynomial equations:
poly = {
eIX == 2 (b[1] b[2] c[2] + b[3] b[4] (c[3] c[4] + s[3] s[4])),
eXI == 2 (b[1] b[3] c[3] + b[2] b[4] (c[2] c[4] + s[2] s[4])),
eXX == 2 (b[1] b[4] c[4] + b[2] b[3] (c[2] c[3] + s[2] s[3])),
eIZ == b[1]^2 - b[2]^2 + b[3]^2 - b[4]^2,
eZI == b[1]^2 + b[2]^2 - b[3]^2 - b[4]^2,
eZZ == b[1]^2 - b[2]^2 - b[3]^2 + b[4]^2,
1 == b[1]^2 + b[2]^2 + b[3]^2 + b[4]^2,
1 == c[2]^2 + s[2]^2,
1 == c[3]^2 + s[3]^2,
1 == c[4]^2 + s[4]^2
}
polyassumps = {
0 <= b[1] <= 1,
0 <= b[2] <= 1,
0 <= b[3] <= 1,
0 <= b[4] <= 1,
-1 <= eIX <= 1,
-1 <= eXI <= 1,
-1 <= eXX <= 1,
-1 <= eIZ <= 1,
-1 <= eZI <= 1,
-1 <= eZZ <= 1,
-1 <= c[2] <= 1,
-1 <= s[2] <= 1,
-1 <= c[3] <= 1,
-1 <= s[3] <= 1,
-1 <= c[4] <= 1,
-1 <= s[4] <= 1
}
Still, Solve
and Reduce
struggle:
Solve[
Join[poly,polyassumps],
{b[1], b[2], b[3], b[4], c[2], c[3], c[4], s[2], s[3], s[4]},
Reals]
Is there a more efficient way to solve simultaneous equations of these kind in Mathematica?
eIX,e1X,...
and after that to useNSolve
? $\endgroup$NSolve
(yet). The expressions to the RHS ofeIX...
are already the outputs ofFullSimplify
given the assumptionsassumps
(if that's what you meant by evaluate) $\endgroup$NSolve
by removing the inequality restrictions and the domain restriction. This will require that the parameters e.g.eIX
be given specific numeric values though. $\endgroup$