The result of
FullSimplify[RotationMatrix[θ, {Cos[ψ], Sin[ψ], 0}], ψ > 0].{0, 0, 1}
in Mathematica 11 is
{Sign[Sec[ψ]]^2 Sin[θ] Sin[ψ], -Cos[ψ] Sin[θ], Cos[θ]}
instead of the nicer result given by
EulerMatrix[{ψ, θ, 0}, {3, 1, 3}].{0, 0, 1}
which is
{Sin[θ] Sin[ψ], -Cos[ψ] Sin[θ], Cos[θ]}
Using just Simplify instead of FullSimplify gives an even more complex result: (yes I know this is expected, I've just put it here for completeness)
{(Sec[ψ] Sin[θ] Tan[ψ])/Abs[Sec[ψ]]^2, -((Sec[ψ] Sin[θ])/Abs[Sec[ψ]]^2), Cos[θ]}
How does one generically get around this simplification issue with RotationMatrix?
Sec[\[Psi]] > 0 || Sec[\[Psi]] < 0– Szabolcs Aug 30 '17 at 19:27Sec[z] != 0for anyz2. Understand thatSign[x]^2 == 1ifx!=0(it can only do this we specifyx>0 || x<0instead of the equivalentx!=0). You'll have to help it through these two somehow. – Szabolcs Aug 31 '17 at 13:01