I want to find the degree of rotation between a stress state and the initial stress state.
em[α_, β_, γ_] :=
EulerMatrix[{α, β, γ}]\[Transpose].{{10, 0,
0}, {0, 20, 0}, {0, 0,
25}}.EulerMatrix[{α, β, γ}]
res = NMinimize[
Norm[EulerMatrix[{Pi/2, 0, 0}]\[Transpose].{{10, 0, 0}, {0, 20,
0}, {0, 0, 25}}.EulerMatrix[{Pi/2, 0, 0}] -
Transpose[em[a, b, c]], "Frobenius"], {a, b, c}, WorkingPrecision->50]
I use the above code to get the solution {a - > 1.16727157, B - > 1.41653756 * 10 ^ - 12, C - > 0.403524756}. But the error between C which is about 0.4 * 180 and the real rotation angle 0 is large. I want to get {Pi/2, 0, 0} or a numerical solution with a small error with {Pi/2, 0, 0}. What shall I do to get a more accurate answer?
Response to comments:
Even if I limit the three variables from - Pi to Pi, the error of the result (c->-0.221782576) is still large. I feel that the norm selection is not accurate, but I don't know how to further improve this code to get more accurate results ( I want to get {Pi/2, 0, 0} or a numerical solution with a small error with {Pi/2, 0, 0}).
em[α_, β_, γ_] :=
EulerMatrix[{α, β, γ}]\[Transpose].{{10, 0,
0}, {0, 20, 0}, {0, 0,
25}}.EulerMatrix[{α, β, γ}]
res = NMinimize[{Norm[
EulerMatrix[{Pi/2, 0, 0}]\[Transpose].{{10, 0, 0}, {0, 20, 0}, {0,
0, 25}}.EulerMatrix[{Pi/2, 0, 0}] - Transpose[em[a, b, c]],
"Frobenius"], (0 <= a <= Pi) && (-Pi <= b <= Pi) && (-Pi <= c <=
Pi)}, {a, b, c}]
In other words, I want to use Mathematica to solve the following matrix equation precisely:
A\[Transpose].{{10, 0, 0}, {0, 20, 0}, {0, 0, 25}}.A == {{35/2, (
5 Sqrt[3])/2, 0}, {(5 Sqrt[3])/2, 25/2, 0}, {0, 0, 25}}
The referenced answer of matrix A is EulerMatrix[{Pi/3, 0, 0}].